Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/perf/p1500-graph-walks.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / perf / p1500-graph-walks.sh` 107 lines ยท 2721 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='Commit walk performance tests' 4 . ./perf-lib.sh 5 6 test_perf_large_repo 7 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) 12 do 13 git branch -f ref-$ref $ref && 14 echo ref-$ref || 15 return 1 16 done >branches && 17 for ref in $(cat refs) 18 do 19 git tag -f tag-$ref $ref && 20 echo tag-$ref || 21 return 1 22 done >tags && 23 24 echo "A:HEAD" >test-tool-refs && 25 for line in $(cat refs) 26 do 27 echo "X:$line" >>test-tool-refs || return 1 28 done && 29 echo "A:HEAD" >test-tool-tags && 30 for line in $(cat tags) 31 do 32 echo "X:$line" >>test-tool-tags || return 1 33 done && 34 35 git rev-list --first-parent --max-count=8192 HEAD >contains-commits && 36 test_file_not_empty contains-commits && 37 git update-ref refs/contains-perf-base "$(tail -n 1 contains-commits)" && 38 awk "{ 39 printf \"update refs/contains-perf/%04d %s\\n\", NR, \$1 40 }" contains-commits | 41 git update-ref --stdin && 42 git pack-refs --include "refs/contains-perf/*" && 43 44 commit=$(git commit-tree HEAD^{tree}) && 45 git update-ref refs/heads/disjoint-base $commit && 46 47 git commit-graph write --reachable 48 ' 49 50 test_perf 'ahead-behind counts: git for-each-ref' ' 51 git for-each-ref --format="%(ahead-behind:HEAD)" --stdin /dev/null 89 ' 90 91 test_perf 'is-base check: test-tool reach (refs)' ' 92 test-tool reach get_branch_base_for_tip