t5537: prepare for changing protocol.file.allow
[alt-git.git] / t / perf / p5326-multi-pack-bitmaps.sh
blobf2fa228f16a1ce5056da5add225cc3130fadeae3
1 #!/bin/sh
3 test_description='Tests performance using midx bitmaps'
4 . ./perf-lib.sh
5 . "${TEST_DIRECTORY}/perf/lib-bitmap.sh"
7 test_perf_large_repo
9 # we need to create the tag up front such that it is covered by the repack and
10 # thus by generated bitmaps.
11 test_expect_success 'create tags' '
12 git tag --message="tag pointing to HEAD" perf-tag HEAD
15 test_expect_success 'start with bitmapped pack' '
16 git repack -adb
19 test_perf 'setup multi-pack index' '
20 git multi-pack-index write --bitmap
23 test_expect_success 'drop pack bitmap' '
24 rm -f .git/objects/pack/pack-*.bitmap
27 test_full_bitmap
29 test_expect_success 'create partial bitmap state' '
30 # pick a commit to represent the repo tip in the past
31 cutoff=$(git rev-list HEAD~100 -1) &&
32 orig_tip=$(git rev-parse HEAD) &&
34 # now pretend we have just one tip
35 rm -rf .git/logs .git/refs/* .git/packed-refs &&
36 git update-ref HEAD $cutoff &&
38 # and then repack, which will leave us with a nice
39 # big bitmap pack of the "old" history, and all of
40 # the new history will be loose, as if it had been pushed
41 # up incrementally and exploded via unpack-objects
42 git repack -Ad &&
43 git multi-pack-index write --bitmap &&
45 # and now restore our original tip, as if the pushes
46 # had happened
47 git update-ref HEAD $orig_tip
50 test_partial_bitmap
52 test_done