summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-05-13 23:50:31 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-13 23:50:32 +0900
commit5b51f0d38d24a21dc69a53e972497928183d399e (patch)
treef6a2e1ec6e7984f0550c1099bc210dc79627f345 /t/perf
parentMerge branch 'jh/trace2-sid-fix' (diff)
parentt/perf: add perf script for partial clones (diff)
downloadtgif-5b51f0d38d24a21dc69a53e972497928183d399e.tar.xz
Merge branch 'js/partial-clone-connectivity-check'
During an initial "git clone --depth=..." partial clone, it is pointless to spend cycles for a large portion of the connectivity check that enumerates and skips promisor objects (which by definition is all objects fetched from the other side). This has been optimized out. * js/partial-clone-connectivity-check: t/perf: add perf script for partial clones clone: do faster object check for partial clones
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p5600-partial-clone.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/perf/p5600-partial-clone.sh b/t/perf/p5600-partial-clone.sh
new file mode 100755
index 0000000000..3e04bd2ae1
--- /dev/null
+++ b/t/perf/p5600-partial-clone.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+test_description='performance of partial clones'
+. ./perf-lib.sh
+
+test_perf_default_repo
+
+test_expect_success 'enable server-side config' '
+ git config uploadpack.allowFilter true &&
+ git config uploadpack.allowAnySHA1InWant true
+'
+
+test_perf 'clone without blobs' '
+ rm -rf bare.git &&
+ git clone --no-local --bare --filter=blob:none . bare.git
+'
+
+test_perf 'checkout of result' '
+ rm -rf worktree &&
+ mkdir -p worktree/.git &&
+ tar -C bare.git -cf - . | tar -C worktree/.git -xf - &&
+ git -C worktree config core.bare false &&
+ git -C worktree checkout -f
+'
+
+test_done