From: Junio C Hamano Date: Mon, 09 Nov 2026 20:04:29 GMT Subject: Re: [PATCH] builtin/reflog: expire --all and named refs in one loop Message-ID: In-Reply-To: Patrick Steinhardt writes: 2 Okay, so instead of carrying the logic around `refs_reflog_expire()` > twice you instead now first gather all reflog names that we want to > expire, and then we do that in a single step. That seems like a useful > simplification to me. > > 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". > > So I wonder whether we should both sort and deduplicate entries here. Very good point. I cannot think of a reason why we should not consider it a bug that the current two-loop model processes and reports about the same thing twice, and the collect-then-process model allows deduplication almost for free to address that bug. Thanks.