diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-10 10:46:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-10 12:52:47 +0200 |
commit | 60f487ac0ef1165932211ede29ea661c79984b16 (patch) | |
tree | 6090719dd46727beb8dffa0bb87a52e4cc4b5744 /generate-cmdlist.sh | |
parent | help: use command-list.h for common command list (diff) | |
download | git-60f487ac0ef1165932211ede29ea661c79984b16.tar.xz git-60f487ac0ef1165932211ede29ea661c79984b16.zip |
Remove common-cmds.h
After the last patch, common-cmds.h is no longer used (and it was
actually broken). Remove all related code. command-list.h will take
its place from now on.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'generate-cmdlist.sh')
-rwxr-xr-x | generate-cmdlist.sh | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 9eb22c4ef1..3bcc1ee57d 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -68,46 +68,6 @@ struct cmdname_help { uint32_t category; }; " -if test -z "$2" -then - define_categories "$1" - echo - print_command_list "$1" - exit 0 -fi - -echo "static const char *common_cmd_groups[] = {" - -grps=grps$$.tmp -match=match$$.tmp -trap "rm -f '$grps' '$match'" 0 1 2 3 15 - -sed -n ' - 1,/^### common groups/b - /^### command list/q - /^#/b - /^[ ]*$/b - h;s/^[^ ][^ ]*[ ][ ]*\(.*\)/ N_("\1"),/p - g;s/^\([^ ][^ ]*\)[ ].*/\1/w '$grps' - ' "$1" -printf '};\n\n' - -n=0 -substnum= -while read grp -do - echo "^git-..*[ ]$grp" - substnum="$substnum${substnum:+;}s/[ ]$grp/$n/" - n=$(($n+1)) -done <"$grps" >"$match" - -printf 'static struct cmdname_help common_cmds[] = {\n' -grep -f "$match" "$1" | -sed 's/^git-//' | -sort | -while read cmd tags -do - tag=$(echo "$tags" | sed "$substnum; s/[^0-9]//g") - echo " {\"$cmd\", $(get_synopsis git-$cmd), $tag}," -done -echo "};" +define_categories "$1" +echo +print_command_list "$1" |