]> git.ipfire.org Git - thirdparty/git.git/blob - t/perf/p9210-scalar.sh
Merge branch 'jk/clone-allow-bare-and-o-together'
[thirdparty/git.git] / t / perf / p9210-scalar.sh
1 #!/bin/sh
2
3 test_description='test scalar performance'
4 . ./perf-lib.sh
5
6 test_perf_large_repo "$TRASH_DIRECTORY/to-clone"
7
8 test_expect_success 'enable server-side partial clone' '
9 git -C to-clone config uploadpack.allowFilter true &&
10 git -C to-clone config uploadpack.allowAnySHA1InWant true
11 '
12
13 test_perf 'scalar clone' '
14 rm -rf scalar-clone &&
15 scalar clone "file://$(pwd)/to-clone" scalar-clone
16 '
17
18 test_perf 'git clone' '
19 rm -rf git-clone &&
20 git clone "file://$(pwd)/to-clone" git-clone
21 '
22
23 test_compare_perf () {
24 command=$1
25 shift
26 args=$*
27 test_perf "$command $args (scalar)" "
28 $command -C scalar-clone/src $args
29 "
30
31 test_perf "$command $args (non-scalar)" "
32 $command -C git-clone $args
33 "
34 }
35
36 test_compare_perf git status
37 test_compare_perf test_commit --append --no-tag A
38
39 test_done