path: root/t/
diff options
authorDerrick Stolee <>2018-10-12 17:34:20 (GMT)
committerJunio C Hamano <>2018-10-22 01:42:46 (GMT)
commit0465a50506023df0932fe0534fe6ac6712c0d854 (patch)
tree1e91456d42766475db5e11a38cf3e9f07d2aac9d /t/
parent1dcd9f2043a38f0c9684d47c71b9e383942660ac (diff)
multi-pack-index: define GIT_TEST_MULTI_PACK_INDEX
The multi-pack-index feature is tested in isolation by, but there are many more interesting scenarios in the test suite surrounding pack-file data shapes and interactions. Since the multi-pack-index is an optional data structure, it does not make sense to include it by default in those tests. Instead, add a new GIT_TEST_MULTI_PACK_INDEX environment variable that enables core.multiPackIndex and writes a multi-pack-index after each 'git repack' command. This adds extra test coverage when needed. There are a few spots in the test suite that need to react to this change: * there is a test that checks that 'git repack' deletes the multi-pack-index. Disable the environment variable to ensure this still happens. * One test moves a pack-file from the object directory to an alternate. This breaks the multi-pack-index, so delete the multi-pack-index at this point, if it exists. * One test verifies the number of files in the .git/objects/pack directory is exactly 8. Exclude the multi-pack-index from this count so it is still 8 in all cases. Signed-off-by: Derrick Stolee <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 0 deletions
diff --git a/t/ b/t/
index 1be3459..82d7f7f 100755
--- a/t/
+++ b/t/
@@ -191,6 +191,7 @@ test_expect_success 'pack-objects respects --honor-pack-keep (local bitmapped pa
test_expect_success 'pack-objects respects --local (non-local bitmapped pack)' '
mv .git/objects/pack/$packbitmap.* alt.git/objects/pack/ &&
+ rm -f .git/objects/pack/multi-pack-index &&
test_when_finished "mv alt.git/objects/pack/$packbitmap.* .git/objects/pack/" &&
echo HEAD | git pack-objects --local --stdout --revs >3b.pack &&
git index-pack 3b.pack &&