(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'Tests pack performance using bitmaps'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./perf-lib.sh)}) (C {(test_perf_large_repo)}) (C {(test_expect_success)} {(SQ <'setup bitmap config'>)} { (SQ <'\n'> <'\tgit config pack.writebitmaps true &&\n'> <'\tgit config pack.writebitmaphashcache true\n'> ) } ) (C {(test_perf)} {(SQ <'repack to disk'>)} {(SQ <'\n'> <'\tgit repack -ad\n'>)}) (C {(test_perf)} {(SQ <'simulated clone'>)} {(SQ <'\n'> <'\tgit pack-objects --stdout --all </dev/null >/dev/null\n'>)} ) (C {(test_perf)} {(SQ <'simulated fetch'>)} { (SQ <'\n'> <'\thave=$(git rev-list HEAD~100 -1) &&\n'> <'\t{\n'> <'\t\techo HEAD &&\n'> <'\t\techo ^$have\n'> <'\t} | git pack-objects --revs --stdout >/dev/null\n'> ) } ) (C {(test_perf)} {(SQ <'pack to file'>)} {(SQ <'\n'> <'\tgit pack-objects --all pack1 </dev/null >/dev/null\n'>)} ) (C {(test_perf)} {(SQ <'pack to file (bitmap)'>)} {(SQ <'\n'> <'\tgit pack-objects --use-bitmap-index --all pack1b </dev/null >/dev/null\n'>)} ) (C {(test_expect_success)} {(SQ <'create partial bitmap state'>)} { (SQ <'\n'> <'\t# pick a commit to represent the repo tip in the past\n'> <'\tcutoff=$(git rev-list HEAD~100 -1) &&\n'> <'\torig_tip=$(git rev-parse HEAD) &&\n'> <'\n'> <'\t# now kill off all of the refs and pretend we had\n'> <'\t# just the one tip\n'> <'\trm -rf .git/logs .git/refs/* .git/packed-refs &&\n'> <'\tgit update-ref HEAD $cutoff &&\n'> <'\n'> <'\t# and then repack, which will leave us with a nice\n'> <'\t# big bitmap pack of the "old" history, and all of\n'> <'\t# the new history will be loose, as if it had been pushed\n'> <'\t# up incrementally and exploded via unpack-objects\n'> <'\tgit repack -Ad &&\n'> <'\n'> <'\t# and now restore our original tip, as if the pushes\n'> <'\t# had happened\n'> <'\tgit update-ref HEAD $orig_tip\n'> ) } ) (C {(test_perf)} {(SQ <'clone (partial bitmap)'>)} {(SQ <'\n'> <'\tgit pack-objects --stdout --all </dev/null >/dev/null\n'>)} ) (C {(test_perf)} {(SQ <'pack to file (partial bitmap)'>)} {(SQ <'\n'> <'\tgit pack-objects --use-bitmap-index --all pack2b </dev/null >/dev/null\n'>)} ) (C {(test_done)}) ] )