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/tools/check-builtins.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 / tools / check-builtins.sh` 34 lines ยท 596 bytes Raw Blame History 1 #!/bin/sh 2 3 { 4 cat <<\EOF 5 sayIt: 6 $(foreach b,$(BUILT_INS),echo XXX $(b:$X=) YYY;) 7 EOF 8 cat Makefile 9 } | 10 make -f - sayIt 2>/dev/null | 11 sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' | 12 sort | 13 { 14 bad=0 15 while read builtin 16 do 17 base=$(expr "$builtin" : 'git-\(.*\)') 18 x=$(sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base' \1/p' git.c) 19 if test -z "$x" 20 then 21 echo "$base is builtin but not listed in git.c command list" 22 bad=1 23 fi 24 for sfx in sh perl py 25 do 26 if test -f "$builtin.$sfx" 27 then 28 echo "$base is builtin but $builtin.$sfx still exists" 29 bad=1 30 fi 31 done 32 done 33 exit $bad 34 }