Re: [PATCH 0/4] Improve performance of reflog expiration
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 19, 2026, 11:58 UTC
- Message-ID
- <av7kgOuPOugFsCbr@pks.im>
- In-Reply-To
- <87bj7mjfp2.fsf@dev.null.iotcl.com.invalid>
On Wed, Nov 18, 2026 at 04:56:57PM +0100, Toon Claes wrote:
Show 20 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > Hi, > > > > I recently noticed that a bunch of commands started hanging for almost a > > second after they're essentially done already. As it turns out, this was > > caused by auto-maintenance, which was blocking in the foreground for > > ~800ms. > > > > The root cause of this is that the auto-condition of "reflog-expire" > > doesn't properly evaluate reachability of reflog entries, so it instead > > considered every single reflog entry to point to an unreachable commit. > > Hence, all entries were evaluated against "gc.reflogExpireUnreachable" > > instead of "gc.reflogExpire", and thus the auto-condition significantly > > overcounts the number of entries that we'd prune. So every single run of > > git-maintenance(1) ultimately ended up spawning `git reflog expire`. > > > > This is fixed by the last patch in this series. > > Well, the last one is a doc change, but I get what you mean.
Oops, true, this one is stale. I only added that last commit after having written the cover letter.
Patrick