From: Patrick Steinhardt <ps@pks.im>
To: Toon Claes <toon@iotcl.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 3/4] builtin/maintenance: only consider `gc.reflogExpire` for "--auto"
Date: Thu, 3 Dec 2026 17:29:36 +0100 [thread overview]
Message-ID: <axGY5lBpG9xqWPTX@pks.im> (raw)
In-Reply-To: <87ik1aqwa2.fsf@dev.null.iotcl.com.invalid>
On Thu, Dec 03, 2026 at 03:22:13PM +0100, Toon Claes wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> > The "reflog-expire" maintenance task is responsible for expiring reflog
> > entries that are older than either "gc.reflogExpire" for entries that
> > are still reachable, or "gc.reflogExpireUnreachable" for those that are
> > not reachable.
> >
> > When executed with "--auto", the condition that we use to trigger this
> > task verifies whether the number of reflog entries that we would prune
> > is larger than "maintenance.reflog-expire.auto". This is evaluated by
> > walking the "HEAD" reflog, where we then check every entry by calling
> > `should_expire_reflog_ent()`. That function will then check whether the
> > reflog entry refers to a commit that is reachable or not, and depending
> > on the outcome compares against either "gc.reflogExpire", or against
> > both "gc.reflogExpire" and "gc.reflogExpireUnreachable".
> >
> > To decide reachability the caller has to call `reflog_expiry_prepare()`,
> > which amongst other things also performs a reachability walk for a given
> > refname. But we don't do that in the "reflog-expire" maintenance task,
> > and hence every single reflog entry will be considered unreachable and
> > thus we'd consider many reachable entries prunable even though they
> > won't be pruned. So we overcount the number of prunable entries quite a
> > bit and will thus trigger `git reflog expire` even though it won't do
> > anything.
> >
> > Now we could easiliy fix that by calling `reflog_expiry_prepare()`. But
>
> s/easiliy/easily/
I've fixed this up locally, but will refrain from sending a new version
just to fix this one typo.
Thanks for your review!
Patrick
next prev parent reply other threads:[~2026-12-03 16:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:30 [PATCH 0/4] Improve performance of reflog expiration Patrick Steinhardt
2026-11-18 9:31 ` [PATCH 1/4] refs/reftable: don't write new table on dry-run expire Patrick Steinhardt
2026-11-18 11:28 ` Karthik Nayak
2026-11-18 12:05 ` Patrick Steinhardt
2026-11-18 16:51 ` Junio C Hamano
2026-11-19 11:59 ` Patrick Steinhardt
2026-11-18 9:31 ` [PATCH 2/4] refs/reftable: don't write new table when expire is a no-op Patrick Steinhardt
2026-11-18 11:33 ` Karthik Nayak
2026-11-18 12:05 ` Patrick Steinhardt
2026-11-18 15:34 ` Toon Claes
2026-11-19 11:57 ` Patrick Steinhardt
2026-11-18 9:31 ` [PATCH 3/4] builtin/maintenance: only consider `gc.reflogExpire` for "--auto" Patrick Steinhardt
2026-11-18 15:52 ` Toon Claes
2026-11-19 11:58 ` Patrick Steinhardt
2026-11-18 9:31 ` [PATCH 4/4] Documentation/config: fix typo in "maintenance.reflog-expire.auto" Patrick Steinhardt
2026-11-18 15:54 ` Toon Claes
2026-11-18 15:56 ` [PATCH 0/4] Improve performance of reflog expiration Toon Claes
2026-11-19 11:58 ` Patrick Steinhardt
2026-12-02 8:45 ` [PATCH v2 " Patrick Steinhardt
2026-12-02 8:45 ` [PATCH v2 1/4] refs/reftable: don't write new table on dry-run expire Patrick Steinhardt
2026-12-02 8:45 ` [PATCH v2 2/4] refs/reftable: don't write new table when expire is a no-op Patrick Steinhardt
2026-12-02 8:45 ` [PATCH v2 3/4] builtin/maintenance: only consider `gc.reflogExpire` for "--auto" Patrick Steinhardt
2026-12-03 14:22 ` Toon Claes
2026-12-03 16:29 ` Patrick Steinhardt [this message]
2026-12-02 8:45 ` [PATCH v2 4/4] Documentation/config: fix typo in "maintenance.reflog-expire.auto" 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=axGY5lBpG9xqWPTX@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=toon@iotcl.com \
/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