summaryrefslogtreecommitdiff
path: root/t/t9152-svn-empty-dirs-after-gc.sh
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <derrickstolee@github.com>2022-03-25 19:02:46 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-25 13:14:59 -0700
commitf1486203f5aa5f813ead5cd8e8583514a101bb22 (patch)
treec1368f4ff0b7aa29f2d8169d556c33ebdb9045d2 /t/t9152-svn-empty-dirs-after-gc.sh
parentThe 14th batch (diff)
downloadtgif-f1486203f5aa5f813ead5cd8e8583514a101bb22.tar.xz
t7700: check post-condition in kept-pack test
The '--write-midx -b packs non-kept objects' test in t7700-repack.sh uses test_subcommand_inexact to check that 'git repack' properly adds the '--honor-pack-keep' flag to the 'git pack-objects' subcommand. However, the test_subcommand_inexact helper is more flexible than initially designed, and this instance is the only one that makes use of it: there are additional arguments between 'git pack-objects' and the '--honor-pack-keep' flag. In order to make test_subcommand_inexact more strict, we need to fix this instance. This test checks that 'git repack --write-midx -a -b -d' will create a new pack-file that does not contain the objects within the kept pack. This behavior is possible because of the multi-pack-index bitmap that will bitmap objects against multiple packs. Without --write-midx, the objects in the kept pack would be duplicated so the resulting pack is closed under reachability and bitmaps can be created against it. This is discussed in more detail in e4d0c11c0 (repack: respect kept objects with '--write-midx -b', 2021-12-20) which also introduced this instance of test_subcommand_inexact. To better verify the intended post-conditions while also removing this instance of test_subcommand_inexact, rewrite the test to check the list of packed objects in the kept pack and the list of the objects in the newly-repacked pack-file _other_ than the kept pack. These lists should be disjoint. Be sure to include a non-kept pack-file and loose objects to be extra careful that this is properly behaving with kept packs and not just avoiding repacking all pack-files. Co-authored-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9152-svn-empty-dirs-after-gc.sh')
0 files changed, 0 insertions, 0 deletions