3 test_description
='Tests performance using midx bitmaps'
5 .
"${TEST_DIRECTORY}/perf/lib-bitmap.sh"
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' '
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
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
43 git multi-pack-index write --bitmap &&
45 # and now restore our original tip, as if the pushes
47 git update-ref HEAD $orig_tip