ref-filter: use string_list_split over strbuf_split
[git/git-svn.git] / t / perf / p5310-pack-bitmaps.sh
blobde2a224a36b728b695c721df1dba16c608bbbb12
1 #!/bin/sh
3 test_description='Tests pack performance using bitmaps'
4 . ./perf-lib.sh
6 test_perf_large_repo
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' '
20 git repack -ad
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) &&
30 echo HEAD &&
31 echo ^$have
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
41 # just the one tip
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
49 git repack -Ad &&
51 # and now restore our original tip, as if the pushes
52 # had happened
53 git update-ref HEAD $orig_tip
56 test_perf 'partial bitmap' '
57 git pack-objects --stdout --all </dev/null >/dev/null
60 test_done