🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Laveesh Bansal Mon, 09 Nov 2026 16:13
Re: [PATCH] builtin/reflog: expire --all and named refs in one loop
#2725
Author: Laveesh Bansal
Date: Mon, 09 Nov 2026 16:13
24 lines
10481 bytes
Patrick Steinhardt <ps@pks.im> writes:

> One thing I wonder though: now that we first gather reflog names, can't
> we also easily deduplicate them? For example if the same reflog name was
> given multiple times on the command line, or in case the reflog is
> included both via a command line argument and via "--all".

I want this patch to change no behavior, and deduplicating would change
the output: with "--verbose", a name given twice lists its entries
twice today, and sorting would reorder them.  It could be done in the
loop, by skipping a name already seen, but that is a separate change.

> Okay, we only apply per-reflog options in the case where the reflog name
> was explicitly specified by the user, becaues only in that case do we
> call `repo_dwim_log()`.

reflog_expire_options_set_refname() is called for every entry in the
loop, as it was in both loops before, so the per-reflog options apply
to the --all entries too.  Only repo_dwim_log() is conditional: the
names from --all come straight from the ref store and need no lookup.

I'll reword the commit message as you suggest and send a v2 once others
have had a chance to comment.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads