From: Laveesh Bansal <laveeshb@laveeshbansal.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Karthik Nayak" <karthik.188@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH v2 2/2] builtin/reflog: expire each reflog only once
Date: Sat, 21 Nov 2026 11:54:00 -0800 [thread overview]
Message-ID: <20261121195400.20517-1-laveeshb@laveeshbansal.com> (raw)
In-Reply-To: <avRiv5WpCZQCbRnZ@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> Isn't this note here important information to point out in the commit
> message? It sounds like a bug to me that we behave differently
> depending on how many times a refname is passed.
Yes. v3 moves it into the commit message.
> Hmm. This here retain the current ordering. But is there a reason why
> we have to maintain it?
The order can matter. With --updateref, expiring a branch can move it,
and "HEAD" is checked against every ref tip, so expiring "HEAD" before
or after that branch can give different results. Sorting would change
the order, so v3 keeps it and uses a strset, which is one lookup per
name.
> Arguably, if the above is a bug, we should also have a test for it
> here.
v3 adds one for --updateref.
next prev parent reply other threads:[~2026-11-21 19:54 UTC|newest]
Thread overview: 13+ 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
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
2026-11-21 19:54 ` Laveesh Bansal [this message]
2026-11-21 19:53 ` [PATCH v3 0/2] " Laveesh Bansal
2026-11-21 19:53 ` [PATCH v3 1/2] builtin/reflog: expire --all and named refs in one loop Laveesh Bansal
2026-11-21 19:53 ` [PATCH v3 2/2] builtin/reflog: expire each reflog only once Laveesh Bansal
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=20261121195400.20517-1-laveeshb@laveeshbansal.com \
--to=laveeshb@laveeshbansal.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=karthik.188@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox