summaryrefslogtreecommitdiff
path: root/t/perf/p5310-pack-bitmaps.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-02-14 18:22:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-14 18:46:22 (GMT)
commit3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd (patch)
tree33cd254d4fb4370094a56e98785ebd27f780c99e /t/perf/p5310-pack-bitmaps.sh
parent84243da1298890bd7370df66b754c2b252a08346 (diff)
downloadgit-3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd.zip
git-3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd.tar.gz
git-3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd.tar.bz2
pack-objects: support filters with bitmaps
Just as rev-list recently learned to combine filters and bitmaps, let's do the same for pack-objects. The infrastructure is all there; we just need to pass along our filter options, and the pack-bitmap code will decide to use bitmaps or not. This unsurprisingly makes things faster for partial clones of large repositories (here we're cloning linux.git): Test HEAD^ HEAD ------------------------------------------------------------------------------ 5310.11: simulated partial clone 38.94(37.28+5.87) 11.06(11.27+4.07) -71.6% Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/p5310-pack-bitmaps.sh')
-rwxr-xr-xt/perf/p5310-pack-bitmaps.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/perf/p5310-pack-bitmaps.sh b/t/perf/p5310-pack-bitmaps.sh
index 8b43a54..7743f4f 100755
--- a/t/perf/p5310-pack-bitmaps.sh
+++ b/t/perf/p5310-pack-bitmaps.sh
@@ -57,6 +57,10 @@ test_perf 'rev-list count with blob:limit=1k' '
--filter=blob:limit=1k >/dev/null
'
+test_perf 'simulated partial clone' '
+ git pack-objects --stdout --all --filter=blob:none </dev/null >/dev/null
+'
+
test_expect_success 'create partial bitmap state' '
# pick a commit to represent the repo tip in the past
cutoff=$(git rev-list HEAD~100 -1) &&