]> git.ipfire.org Git - thirdparty/git.git/blob - t/perf/p1400-update-ref.sh
refs: implement reference transaction hook
[thirdparty/git.git] / t / perf / p1400-update-ref.sh
1 #!/bin/sh
2
3 test_description="Tests performance of update-ref"
4
5 . ./perf-lib.sh
6
7 test_perf_fresh_repo
8
9 test_expect_success "setup" '
10 test_commit PRE &&
11 test_commit POST &&
12 printf "create refs/heads/%d PRE\n" $(test_seq 1000) >create &&
13 printf "update refs/heads/%d POST PRE\n" $(test_seq 1000) >update &&
14 printf "delete refs/heads/%d POST\n" $(test_seq 1000) >delete
15 '
16
17 test_perf "update-ref" '
18 for i in $(test_seq 1000)
19 do
20 git update-ref refs/heads/branch PRE &&
21 git update-ref refs/heads/branch POST PRE &&
22 git update-ref -d refs/heads/branch
23 done
24 '
25
26 test_perf "update-ref --stdin" '
27 git update-ref --stdin <create &&
28 git update-ref --stdin <update &&
29 git update-ref --stdin <delete
30 '
31
32 test_done