Skip to content

Commit e1d3a6e

Browse files
committed
Merge branch 'js/partial-clone-connectivity-check' into next
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
2 parents 71c3967 + 1bb10d4 commit e1d3a6e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

t/perf/p5600-partial-clone.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
test_description='performance of partial clones'
4+
. ./perf-lib.sh
5+
6+
test_perf_default_repo
7+
8+
test_expect_success 'enable server-side config' '
9+
git config uploadpack.allowFilter true &&
10+
git config uploadpack.allowAnySHA1InWant true
11+
'
12+
13+
test_perf 'clone without blobs' '
14+
rm -rf bare.git &&
15+
git clone --no-local --bare --filter=blob:none . bare.git
16+
'
17+
18+
test_perf 'checkout of result' '
19+
rm -rf worktree &&
20+
mkdir -p worktree/.git &&
21+
tar -C bare.git -cf - . | tar -C worktree/.git -xf - &&
22+
git -C worktree config core.bare false &&
23+
git -C worktree checkout -f
24+
'
25+
26+
test_done

0 commit comments

Comments
 (0)