3 test_description
='Tests performance using midx bitmaps'
5 .
"${TEST_DIRECTORY}/perf/lib-bitmap.sh"
10 test_expect_success
"remove existing repo (lookup=$enabled)" '
16 # we need to create the tag up front such that it is covered by the repack and
17 # thus by generated bitmaps.
18 test_expect_success
'create tags' '
19 git tag --message="tag pointing to HEAD" perf-tag HEAD
22 test_expect_success
"use lookup table: $enabled" '
23 git config pack.writeBitmapLookupTable '"$enabled"'
26 test_expect_success
"start with bitmapped pack (lookup=$enabled)" '
30 test_perf
"setup multi-pack index (lookup=$enabled)" '
31 git multi-pack-index write --bitmap
34 test_expect_success
"drop pack bitmap (lookup=$enabled)" '
35 rm -f .git/objects/pack/pack-*.bitmap
40 test_expect_success
"create partial bitmap state (lookup=$enabled)" '
41 # pick a commit to represent the repo tip in the past
42 cutoff=$(git rev-list HEAD~100 -1) &&
43 orig_tip=$(git rev-parse HEAD) &&
45 # now pretend we have just one tip
46 rm -rf .git/logs .git/refs/* .git/packed-refs &&
47 git update-ref HEAD $cutoff &&
49 # and then repack, which will leave us with a nice
50 # big bitmap pack of the "old" history, and all of
51 # the new history will be loose, as if it had been pushed
52 # up incrementally and exploded via unpack-objects
54 git multi-pack-index write --bitmap &&
56 # and now restore our original tip, as if the pushes
58 git update-ref HEAD $orig_tip