From: Derrick Stolee Date: Mon, 23 Feb 2026 00:48:20 GMT Subject: Re: [PATCH 3/8] t34xx: don't expire reflogs where it matters Message-ID: <86490d73-dee3-4750-b99c-ff94848bcdbb@gmail.com> In-Reply-To: <20260220-b4-pks-maintenance-default-geometric-strategy-v1-3-faeb321ad13b@pks.im> On 2/20/26 5:15 AM, Patrick Steinhardt wrote: > We have a couple of tests in the t34xx range that rely on reflogs. This > never really used to be a problem, but in a subsequent commit we will > change the default maintenance strategy from "gc" to "geometric", and > this will cause us to drop all reflogs in these tests. > > This may seem surprising and like a bug at first, but it's actually not. > The main difference between these two strategies is that the "gc" > strategy will skip all maintenance in case the object database is in a > well-optimized state. The "geometric" strategy has separate subtasks > though, and the conditions for each of these tasks is evaluated on a > case by case basis. This means that even if the object database is in > good shape, we may still decide to expire reflogs. > > So why is that a problem? The issue is that Git's test suite hardcodes > the committer and author dates to a date in 2005. Interestingly though, > these hardcoded dates not only impact the commits, but also the reflog > entries. The consequence is that all newly written reflog entries are > immediately considered stale as our reflog expiration threshold is in > the range of weeks, only. It follows that executing `git reflog expire` > will thus immediately purge all reflog entries. I found these two paragraphs very valuable in explaining this patch. Thanks! -Stolee