3 test_description
="Tests performance of update-ref"
9 test_expect_success
"setup" '
12 for i in $(test_seq 5000)
14 printf "start\ncreate refs/heads/%d PRE\ncommit\n" $i &&
15 printf "start\nupdate refs/heads/%d POST PRE\ncommit\n" $i &&
16 printf "start\ndelete refs/heads/%d POST\ncommit\n" $i || return 1
20 test_perf
"update-ref" '
21 for i in $(test_seq 1000)
23 git update-ref refs/heads/branch PRE &&
24 git update-ref refs/heads/branch POST PRE &&
25 git update-ref -d refs/heads/branch || return 1
29 test_perf
"update-ref --stdin" '
30 git update-ref --stdin <instructions >/dev/null