Re: [PATCH v2 6/8] t6500: explicitly use "gc" strategy
- From
Toon Claes <toon@iotcl.com>
- Date
- Feb 25, 2026, 10:13 UTC
- Message-ID
- <871pi9nnao.fsf@iotcl.com>
- In-Reply-To
- <20260224-b4-pks-maintenance-default-geometric-strategy-v2-6-8657338c6fa1@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 25 quoted lines
> The test in t6500 explicitly wants to exercise git-gc(1) and is thus > highly specific to the actual on-disk state of the repository and > specifically of the object database. An upcoming change modifies the > default maintenance strategy to be the "geometric" strategy though, > which breaks a couple of assumptions. > > One fix would arguably be to disable auto-maintenance altogether, as we > do want to explicitly verify git-gc(1) anyway. But as the whole test > suite is about git-gc(1) in the first place it feels more sensible to > configure the default maintenance strategy to be "gc". > > Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > t/t6500-gc.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh > index bef472cb8d..ea9aaad470 100755 > --- a/t/t6500-gc.sh > +++ b/t/t6500-gc.sh > @@ -11,6 +11,7 @@ test_expect_success 'setup' ' > # behavior, make sure we always pack everything to one pack by > # default > git config gc.bigPackThreshold 2g && > + git config set --global maintenance.strategy gc &&
I wasn't sure (no more) what effect setting globally would have. But because each test file operates in it's own $TRASH_DIRECTORY, a global setting only affects that file.
Makes sense.
-- Cheers, Toon