diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 13:37:19 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 13:37:19 (GMT) |
commit | 5fb9263295b425c7acfde66c8abe5d53fa55d2c3 (patch) | |
tree | 8e62ddfccfdc49a24407fcf1eafc67e5548fdfd8 /t | |
parent | 25e4da89edc5339019f0d7c29a21ef4e08cccf24 (diff) | |
parent | dc7d66433536b5acca653c3c5ecf9c2d91462eba (diff) | |
download | git-5fb9263295b425c7acfde66c8abe5d53fa55d2c3.zip git-5fb9263295b425c7acfde66c8abe5d53fa55d2c3.tar.gz git-5fb9263295b425c7acfde66c8abe5d53fa55d2c3.tar.bz2 |
Merge branch 'ds/test-multi-pack-index'
Tests for the recently introduced multi-pack index machinery.
* ds/test-multi-pack-index:
packfile: close multi-pack-index in close_all_packs
multi-pack-index: define GIT_TEST_MULTI_PACK_INDEX
midx: close multi-pack-index on repack
midx: fix broken free() in close_midx()
Diffstat (limited to 't')
-rw-r--r-- | t/README | 4 | ||||
-rwxr-xr-x | t/t5310-pack-bitmaps.sh | 1 | ||||
-rwxr-xr-x | t/t5319-multi-pack-index.sh | 2 | ||||
-rwxr-xr-x | t/t9300-fast-import.sh | 2 |
4 files changed, 7 insertions, 2 deletions
@@ -344,6 +344,10 @@ of the index for the whole test suite by bypassing the default number of cache entries and thread minimums. Setting this to 1 will make the index loading single threaded. +GIT_TEST_MULTI_PACK_INDEX=<boolean>, when true, forces the multi-pack- +index to be written after every 'git repack' command, and overrides the +'core.multiPackIndex' setting to true. + Naming Tests ------------ diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh index 1be3459..82d7f7f 100755 --- a/t/t5310-pack-bitmaps.sh +++ b/t/t5310-pack-bitmaps.sh @@ -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 && diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index bd8e841..70926b5 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -271,7 +271,7 @@ test_expect_success 'git-fsck incorrect offset' ' test_expect_success 'repack removes multi-pack-index' ' test_path_is_file $objdir/pack/multi-pack-index && - git repack -adf && + GIT_TEST_MULTI_PACK_INDEX=0 git repack -adf && test_path_is_missing $objdir/pack/multi-pack-index ' 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 |