3 test_description="Tests performance of update-ref"
9 test_expect_success "setup" '
10 git init --bare target-repo.git &&
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 &&
15 printf "delete refs/heads/%d POST\n" $(test_seq 1000) >delete &&
16 git update-ref --stdin <create
19 test_perf "update-ref" '
20 for i in $(test_seq 1000)
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
28 test_perf "update-ref --stdin" '
29 git update-ref --stdin <update &&
30 git update-ref --stdin <delete &&
31 git update-ref --stdin <create
34 test_perf "nonatomic push" '
35 git push ./target-repo.git $(test_seq 1000) &&
36 git push --delete ./target-repo.git $(test_seq 1000)