From: Laveesh Bansal Date: Mon, 09 Nov 2026 16:13:13 GMT Subject: Re: [PATCH] builtin/reflog: expire --all and named refs in one loop Message-ID: <20261109161313.54630-1-laveeshb@laveeshbansal.com> In-Reply-To: Patrick Steinhardt 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.