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
11 test_expect_success 'setup bitmap config' '
12 git config pack.writebitmaps true &&
13 git config pack.writebitmaphashcache true
16 test_perf 'repack to disk' '
20 test_perf 'simulated clone' '
21 git pack-objects --stdout --all </dev/null >/dev/null
24 test_perf 'simulated fetch' '
25 have=$(git rev-list HEAD~100 -1) &&
29 } | git pack-objects --revs --stdout >/dev/null
32 test_expect_success 'create partial bitmap state' '
33 # pick a commit to represent the repo tip in the past
34 cutoff=$(git rev-list HEAD~100 -1) &&
35 orig_tip=$(git rev-parse HEAD) &&
37 # now kill off all of the refs and pretend we had
39 rm -rf .git/logs .git/refs/* .git/packed-refs
40 git update-ref HEAD $cutoff
42 # and then repack, which will leave us with a nice
43 # big bitmap pack of the "old" history, and all of
44 # the new history will be loose, as if it had been pushed
45 # up incrementally and exploded via unpack-objects
48 # and now restore our original tip, as if the pushes
50 git update-ref HEAD $orig_tip
53 test_perf 'partial bitmap' '
54 git pack-objects --stdout --all </dev/null >/dev/null