Re: [PATCH v4 00/10] builtin/maintenance: introduce "geometric" strategy
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 27, 2025, 20:05 UTC
- Message-ID
- <aP_Qe2QG5w3g4Z9y@pks.im>
- In-Reply-To
- <xmqqtszkjq8d.fsf@gitster.g>
On Mon, Oct 27, 2025 at 08:53:22AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > Changes in v4: > > - Fix a flaky test because git-repack(1) always decides to rewrite the > > MIDX, even though no packs have changed. This isn't a new issue, and > > other maintenance tasks behave the same. So I decided to punt on it > > for now. > > Thanks, but this round raced against 'next', so let me fabricate the > following and queue it instead.
Thanks for doing this!
> ------- >8 ------- > From: Patrick Steinhardt <ps@pks.im> > Date: Mon, 27 Oct 2025 09:30:50 +0100 > Subject: [PATCH] t7900: fix a flaky test due to git-repack always regenerating .midx
s/.midx/MIDX, as the MIDX file does not have a dot anywhere.
Show 7 quoted lines
> > When a supposedly no-op "git repack" runs across a second boundary, > because the command always touches the MIDX file and updates its > timestamp, "ls -l $GIT_DIR/objects/pack/" before and after the > operation can change, which causes such a test to fail. Only > compare the *.pack files in the directory before and after the > operation to work around this flakyness.
Maybe add something like the following:
Arguably, git-repack(1) should learn to not rewrite the MIDX in case
we know it is already up-to-date. But this is not a new problem
introduced via the new geometric maintenance task, so for now it
should be good enough to paper over the issue.But I think this looks good enough already, so please feel free to ignore. Happy to have my authorship with either of these versions.
Thanks!
Patrick
Show 26 quoted lines
> Signed-off-by: Patrick Steinhardt <ps@pks.im> > [jc: taken from diff to v4 from v3 that was already merged to 'next'] > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > t/t7900-maintenance.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh > index 0d76693fee..614184a097 100755 > --- a/t/t7900-maintenance.sh > +++ b/t/t7900-maintenance.sh > @@ -500,9 +500,9 @@ test_expect_success 'geometric repacking task' ' > > # Repacking should now cause a no-op geometric repack because > # no packfiles need to be combined. > - ls -l .git/objects/pack >before && > + ls -l .git/objects/pack/*.pack >before && > run_and_verify_geometric_pack 1 && > - ls -l .git/objects/pack >after && > + ls -l .git/objects/pack/*.pack >after && > test_cmp before after && > > # This incremental change creates a new packfile that only > -- > 2.51.2-678-g0cd646409c >