summaryrefslogtreecommitdiff
path: root/t/t5310-pack-bitmaps.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-02-14 13:22:41 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-14 10:46:22 -0800
commit3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd (patch)
tree33cd254d4fb4370094a56e98785ebd27f780c99e /t/t5310-pack-bitmaps.sh
parentpack-bitmap: implement BLOB_LIMIT filtering (diff)
downloadtgif-3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd.tar.xz
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/t5310-pack-bitmaps.sh')
-rwxr-xr-xt/t5310-pack-bitmaps.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5310-pack-bitmaps.sh b/t/t5310-pack-bitmaps.sh
index 2c64d0c441..8318781d2b 100755
--- a/t/t5310-pack-bitmaps.sh
+++ b/t/t5310-pack-bitmaps.sh
@@ -107,6 +107,20 @@ test_expect_success 'clone from bitmapped repository' '
test_cmp expect actual
'
+test_expect_success 'partial clone from bitmapped repository' '
+ test_config uploadpack.allowfilter true &&
+ git clone --no-local --bare --filter=blob:none . partial-clone.git &&
+ (
+ cd partial-clone.git &&
+ pack=$(echo objects/pack/*.pack) &&
+ git verify-pack -v "$pack" >have &&
+ awk "/blob/ { print \$1 }" <have >blobs &&
+ # we expect this single blob because of the direct ref
+ git rev-parse refs/tags/tagged-blob >expect &&
+ test_cmp expect blobs
+ )
+'
+
test_expect_success 'setup further non-bitmapped commits' '
test_commit_bulk --id=further 10
'