3 test_description
='Commit walk performance tests'
8 test_expect_success
'setup' '
9 git for-each-ref --format="%(refname)" "refs/heads/*" "refs/tags/*" >allrefs &&
10 sort -r allrefs | head -n 50 >refs &&
11 for ref in $(cat refs)
13 git branch -f ref-$ref $ref &&
17 for ref in $(cat refs)
19 git tag -f tag-$ref $ref &&
23 git commit-graph write --reachable
26 test_perf
'ahead-behind counts: git for-each-ref' '
27 git for-each-ref --format="%(ahead-behind:HEAD)" --stdin <refs
30 test_perf
'ahead-behind counts: git branch' '
31 xargs git branch -l --format="%(ahead-behind:HEAD)" <branches
34 test_perf
'ahead-behind counts: git tag' '
35 xargs git tag -l --format="%(ahead-behind:HEAD)" <tags
38 test_perf
'contains: git for-each-ref --merged' '
39 git for-each-ref --merged=HEAD --stdin <refs
42 test_perf
'contains: git branch --merged' '
43 xargs git branch --merged=HEAD <branches
46 test_perf
'contains: git tag --merged' '
47 xargs git tag --merged=HEAD <tags