summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-10-12 17:34:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-22 01:42:46 (GMT)
commit0465a50506023df0932fe0534fe6ac6712c0d854 (patch)
tree1e91456d42766475db5e11a38cf3e9f07d2aac9d /t/t9300-fast-import.sh
parent1dcd9f2043a38f0c9684d47c71b9e383942660ac (diff)
downloadgit-0465a50506023df0932fe0534fe6ac6712c0d854.zip
git-0465a50506023df0932fe0534fe6ac6712c0d854.tar.gz
git-0465a50506023df0932fe0534fe6ac6712c0d854.tar.bz2
multi-pack-index: define GIT_TEST_MULTI_PACK_INDEX
The multi-pack-index feature is tested in isolation by t5319-multi-pack-index.sh, 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: * t5319-multi-pack-index.sh: there is a test that checks that 'git repack' deletes the multi-pack-index. Disable the environment variable to ensure this still happens. * t5310-pack-bitmaps.sh: 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. * t9300-fast-import.sh: 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 <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 40fe7e4..59a13b6 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1558,7 +1558,7 @@ test_expect_success 'O: blank lines not necessary after other commands' '
INPUT_END
git fast-import <input &&
- test 8 = $(find .git/objects/pack -type f | wc -l) &&
+ test 8 = $(find .git/objects/pack -type f | grep -v multi-pack-index | wc -l) &&
test $(git rev-parse refs/tags/O3-2nd) = $(git rev-parse O3^) &&
git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
test_cmp expect actual