]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5400: explicitly use "gc" strategy
authorPatrick Steinhardt <ps@pks.im>
Tue, 24 Feb 2026 08:45:48 +0000 (09:45 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Feb 2026 15:33:19 +0000 (07:33 -0800)
In t5400 we verify that git-receive-pack(1) runs automated repository
maintenance in the remote repository. The check is performed indirectly
by observing an effect that git-gc(1) would have, namely to prune a
temporary object from the object database. In a subsequent commit we're
about to switch to the "geometric" strategy by default though, and here
we stop observing that effect.

Adapt the test to explicitly use the "gc" strategy to prepare for that
upcoming change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5400-send-pack.sh

index 83b42ff073397120257eb79096c7162e52990f78..b32a0a6aa77e12b51639a2f04fcdaf49bb8b1203 100755 (executable)
@@ -187,6 +187,7 @@ test_expect_success 'receive-pack runs auto-gc in remote repo' '
                cd child &&
                git config gc.autopacklimit 1 &&
                git config gc.autodetach false &&
+               git config maintenance.strategy gc &&
                git branch test_auto_gc &&
                # And create a file that follows the temporary object naming
                # convention for the auto-gc to remove