3 test_description='Tests pack performance using bitmaps'
8 # note that we do everything through config,
9 # since we want to be able to compare bitmap-aware
10 # git versus non-bitmap git
12 # We intentionally use the deprecated pack.writebitmaps
13 # config so that we can test against older versions of git.
14 test_expect_success 'setup bitmap config' '
15 git config pack.writebitmaps true &&
16 git config pack.writebitmaphashcache true
19 test_perf 'repack to disk' '
23 test_perf 'simulated clone' '
24 git pack-objects --stdout --all </dev/null >/dev/null
27 test_perf 'simulated fetch' '
28 have=$(git rev-list HEAD~100 -1) &&
32 } | git pack-objects --revs --stdout >/dev/null
35 test_expect_success 'create partial bitmap state' '
36 # pick a commit to represent the repo tip in the past
37 cutoff=$(git rev-list HEAD~100 -1) &&
38 orig_tip=$(git rev-parse HEAD) &&
40 # now kill off all of the refs and pretend we had
42 rm -rf .git/logs .git/refs/* .git/packed-refs &&
43 git update-ref HEAD $cutoff &&
45 # and then repack, which will leave us with a nice
46 # big bitmap pack of the "old" history, and all of
47 # the new history will be loose, as if it had been pushed
48 # up incrementally and exploded via unpack-objects
51 # and now restore our original tip, as if the pushes
53 git update-ref HEAD $orig_tip
56 test_perf 'partial bitmap' '
57 git pack-objects --stdout --all </dev/null >/dev/null