3 test_description
='Tests pack performance using bitmaps'
5 .
"${TEST_DIRECTORY}/perf/lib-bitmap.sh"
9 # note that we do everything through config,
10 # since we want to be able to compare bitmap-aware
11 # git versus non-bitmap git
13 # We intentionally use the deprecated pack.writebitmaps
14 # config so that we can test against older versions of git.
15 test_expect_success
'setup bitmap config' '
16 git config pack.writebitmaps true
19 # we need to create the tag up front such that it is covered by the repack and
20 # thus by generated bitmaps.
21 test_expect_success
'create tags' '
22 git tag --message="tag pointing to HEAD" perf-tag HEAD
25 test_perf
'repack to disk' '
31 test_expect_success
'create partial bitmap state' '
32 # pick a commit to represent the repo tip in the past
33 cutoff=$(git rev-list HEAD~100 -1) &&
34 orig_tip=$(git rev-parse HEAD) &&
36 # now kill off all of the refs and pretend we had
38 rm -rf .git/logs .git/refs/* .git/packed-refs &&
39 git update-ref HEAD $cutoff &&
41 # and then repack, which will leave us with a nice
42 # big bitmap pack of the "old" history, and all of
43 # the new history will be loose, as if it had been pushed
44 # up incrementally and exploded via unpack-objects
47 # and now restore our original tip, as if the pushes
49 git update-ref HEAD $orig_tip