]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t6500-gc.sh: add additional test cases
authorTaylor Blau <me@ttaylorr.com>
Tue, 18 Apr 2023 20:40:49 +0000 (16:40 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Apr 2023 21:56:48 +0000 (14:56 -0700)
In the last commit, we refactored some of the tests in t6500 to make
clearer when cruft packs will and won't be generated by `git gc`.

Add the remaining cases not covered by the previous patch into this one,
which enumerates all possible combinations of arguments that will
produce (or not produce) a cruft pack.

This prepares us for a future commit which will change the default value
of `gc.cruftPacks` by ensuring that we understand which invocations do
and do not change as a result.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6500-gc.sh

index a2f988c5c2215f895a57aff57ef92e190f3730dc..3ba2ae514037ca455911c4f123ccebd318550efd 100755 (executable)
@@ -218,6 +218,7 @@ assert_no_cruft_packs () {
 for argv in \
        "gc --cruft" \
        "-c gc.cruftPacks=true gc" \
+       "-c gc.cruftPacks=false gc --cruft" \
        "-c feature.experimental=true gc" \
        "-c gc.cruftPacks=true -c feature.experimental=false gc"
 do
@@ -243,6 +244,9 @@ do
 done
 
 for argv in \
+       "gc" \
+       "-c gc.cruftPacks=false gc" \
+       "-c gc.cruftPacks=true gc --no-cruft" \
        "-c feature.expiremental=true -c gc.cruftPacks=false gc" \
        "-c feature.experimental=false gc"
 do