]> git.ipfire.org Git - thirdparty/git.git/blame - t/perf/p1400-update-ref.sh
refs: remove lookup cache for reference-transaction hook
[thirdparty/git.git] / t / perf / p1400-update-ref.sh
CommitLineData
67541597
PS
1#!/bin/sh
2
3test_description="Tests performance of update-ref"
4
5. ./perf-lib.sh
6
7test_perf_fresh_repo
8
9test_expect_success "setup" '
0a0fbbe3 10 git init --bare target-repo.git &&
67541597
PS
11 test_commit PRE &&
12 test_commit POST &&
13 printf "create refs/heads/%d PRE\n" $(test_seq 1000) >create &&
14 printf "update refs/heads/%d POST PRE\n" $(test_seq 1000) >update &&
0a0fbbe3
PS
15 printf "delete refs/heads/%d POST\n" $(test_seq 1000) >delete &&
16 git update-ref --stdin <create
67541597
PS
17'
18
19test_perf "update-ref" '
20 for i in $(test_seq 1000)
21 do
22 git update-ref refs/heads/branch PRE &&
23 git update-ref refs/heads/branch POST PRE &&
24 git update-ref -d refs/heads/branch
25 done
26'
27
28test_perf "update-ref --stdin" '
67541597 29 git update-ref --stdin <update &&
0a0fbbe3
PS
30 git update-ref --stdin <delete &&
31 git update-ref --stdin <create
32'
33
34test_perf "nonatomic push" '
35 git push ./target-repo.git $(test_seq 1000) &&
36 git push --delete ./target-repo.git $(test_seq 1000)
67541597
PS
37'
38
39test_done