| test_description="Tests performance of update-ref" |
| test_expect_success "setup" ' |
| for i in $(test_seq 5000) |
| printf "start\ncreate refs/heads/%d PRE\ncommit\n" $i && |
| printf "start\nupdate refs/heads/%d POST PRE\ncommit\n" $i && |
| printf "start\ndelete refs/heads/%d POST\ncommit\n" $i || return 1 |
| for i in $(test_seq 1000) |
| git update-ref refs/heads/branch PRE && |
| git update-ref refs/heads/branch POST PRE && |
| git update-ref -d refs/heads/branch || return 1 |
| test_perf "update-ref --stdin" ' |
| git update-ref --stdin <instructions >/dev/null |