All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: "Laveesh Bansal" <laveeshb@laveeshbansal.com>,
	git@vger.kernel.org, "Karthik Nayak" <karthik.188@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] builtin/reflog: expire --all and named refs in one loop
Date: Mon, 09 Nov 2026 12:04:29 -0800	[thread overview]
Message-ID: <xmqqwlqlydo2.fsf@gitster.g> (raw)
In-Reply-To: <avGU-Wjkd821PLc0@pks.im> (Patrick Steinhardt's message of "Mon, 9 Nov 2026 10:40:09 +0100")

Patrick Steinhardt <ps@pks.im> 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.

  parent reply	other threads:[~2026-11-09 20:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  1:22 [PATCH] builtin/reflog: expire --all and named refs in one loop Laveesh Bansal
2026-11-09  9:40 ` Patrick Steinhardt
2026-11-09 16:13   ` Laveesh Bansal
2026-11-10  7:09     ` Patrick Steinhardt
2026-11-09 20:04   ` Junio C Hamano [this message]
2026-11-10 15:26 ` [PATCH v2 0/2] builtin/reflog: expire each reflog only once Laveesh Bansal
2026-11-10 15:26   ` [PATCH v2 1/2] builtin/reflog: expire --all and named refs in one loop Laveesh Bansal
2026-11-10 15:26   ` [PATCH v2 2/2] builtin/reflog: expire each reflog only once Laveesh Bansal
2026-11-11 12:42     ` Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqwlqlydo2.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=laveeshb@laveeshbansal.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.