diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-01 23:39:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-01 23:48:28 -0800 |
commit | 79d30668ab5c5e029c89c8aa2e466d2320658f5a (patch) | |
tree | b77a5494a9f126e044b23a682b51cde71614a3c1 | |
parent | Resurrect peek-remote (diff) | |
download | tgif-79d30668ab5c5e029c89c8aa2e466d2320658f5a.tar.xz |
Consolidate command list to one.
The categorized list of commands in git(7) and the list of common
commands in "git help" output were maintained separately, which was
insane. This consolidates them to a single command-list.txt file.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/Makefile | 4 | ||||
-rwxr-xr-x | Documentation/cmd-list.perl | 139 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | command-list.txt | 128 | ||||
-rwxr-xr-x | generate-cmdlist.sh | 25 |
5 files changed, 141 insertions, 163 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index d88664177d..de11ee0192 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -122,9 +122,9 @@ cmds_txt = cmds-ancillaryinterrogators.txt \ $(cmds_txt): cmd-list.made -cmd-list.made: cmd-list.perl $(MAN1_TXT) +cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) $(RM) $@ - perl ./cmd-list.perl + perl ./cmd-list.perl ../command-list.txt date >$@ git.7 git.html: git.txt diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl index b709551726..c2d55cdb5e 100755 --- a/Documentation/cmd-list.perl +++ b/Documentation/cmd-list.perl @@ -28,8 +28,8 @@ sub format_one { } if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) { print $out "gitlink:$name\[1\]::\n\t"; - if ($attr) { - print $out "($attr) "; + if ($attr =~ / deprecated /) { + print $out "(deprecated) "; } print $out "$text.\n\n"; } @@ -39,12 +39,13 @@ sub format_one { } my %cmds = (); -while (<DATA>) { +for (sort <>) { next if /^#/; chomp; my ($name, $cat, $attr) = /^(\S+)\s+(.*?)(?:\s+(.*))?$/; - push @{$cmds{$cat}}, [$name, $attr]; + $attr = '' unless defined $attr; + push @{$cmds{$cat}}, [$name, " $attr "]; } for my $cat (qw(ancillaryinterrogators @@ -71,133 +72,3 @@ for my $cat (qw(ancillaryinterrogators rename "$out+", "$out"; } } - -# The following list is sorted with "sort -d" to make it easier -# to find entry in the resulting git.html manual page. -__DATA__ -git-add mainporcelain -git-am mainporcelain -git-annotate ancillaryinterrogators -git-apply plumbingmanipulators -git-archimport foreignscminterface -git-archive mainporcelain -git-bisect mainporcelain -git-blame ancillaryinterrogators -git-branch mainporcelain -git-bundle mainporcelain -git-cat-file plumbinginterrogators -git-check-attr purehelpers -git-checkout mainporcelain -git-checkout-index plumbingmanipulators -git-check-ref-format purehelpers -git-cherry ancillaryinterrogators -git-cherry-pick mainporcelain -git-citool mainporcelain -git-clean mainporcelain -git-clone mainporcelain -git-commit mainporcelain -git-commit-tree plumbingmanipulators -git-config ancillarymanipulators -git-count-objects ancillaryinterrogators -git-cvsexportcommit foreignscminterface -git-cvsimport foreignscminterface -git-cvsserver foreignscminterface -git-daemon synchingrepositories -git-describe mainporcelain -git-diff mainporcelain -git-diff-files plumbinginterrogators -git-diff-index plumbinginterrogators -git-diff-tree plumbinginterrogators -git-fast-import ancillarymanipulators -git-fetch mainporcelain -git-fetch-pack synchingrepositories -git-filter-branch ancillarymanipulators -git-fmt-merge-msg purehelpers -git-for-each-ref plumbinginterrogators -git-format-patch mainporcelain -git-fsck ancillaryinterrogators -git-gc mainporcelain -git-get-tar-commit-id ancillaryinterrogators -git-grep mainporcelain -git-gui mainporcelain -git-hash-object plumbingmanipulators -git-http-fetch synchelpers -git-http-push synchelpers -git-imap-send foreignscminterface -git-index-pack plumbingmanipulators -git-init mainporcelain -git-instaweb ancillaryinterrogators -gitk mainporcelain -git-log mainporcelain -git-lost-found ancillarymanipulators deprecated -git-ls-files plumbinginterrogators -git-ls-remote plumbinginterrogators -git-ls-tree plumbinginterrogators -git-mailinfo purehelpers -git-mailsplit purehelpers -git-merge mainporcelain -git-merge-base plumbinginterrogators -git-merge-file plumbingmanipulators -git-merge-index plumbingmanipulators -git-merge-one-file purehelpers -git-mergetool ancillarymanipulators -git-merge-tree ancillaryinterrogators -git-mktag plumbingmanipulators -git-mktree plumbingmanipulators -git-mv mainporcelain -git-name-rev plumbinginterrogators -git-pack-objects plumbingmanipulators -git-pack-redundant plumbinginterrogators -git-pack-refs ancillarymanipulators -git-parse-remote synchelpers -git-patch-id purehelpers -git-peek-remote purehelpers deprecated -git-prune ancillarymanipulators -git-prune-packed plumbingmanipulators -git-pull mainporcelain -git-push mainporcelain -git-quiltimport foreignscminterface -git-read-tree plumbingmanipulators -git-rebase mainporcelain -git-receive-pack synchelpers -git-reflog ancillarymanipulators -git-relink ancillarymanipulators -git-remote ancillarymanipulators -git-repack ancillarymanipulators -git-request-pull foreignscminterface -git-rerere ancillaryinterrogators -git-reset mainporcelain -git-revert mainporcelain -git-rev-list plumbinginterrogators -git-rev-parse ancillaryinterrogators -git-rm mainporcelain -git-runstatus ancillaryinterrogators -git-send-email foreignscminterface -git-send-pack synchingrepositories -git-shell synchelpers -git-shortlog mainporcelain -git-show mainporcelain -git-show-branch ancillaryinterrogators -git-show-index plumbinginterrogators -git-show-ref plumbinginterrogators -git-sh-setup purehelpers -git-stash mainporcelain -git-status mainporcelain -git-stripspace purehelpers -git-submodule mainporcelain -git-svn foreignscminterface -git-symbolic-ref plumbingmanipulators -git-tag mainporcelain -git-tar-tree plumbinginterrogators deprecated -git-unpack-file plumbinginterrogators -git-unpack-objects plumbingmanipulators -git-update-index plumbingmanipulators -git-update-ref plumbingmanipulators -git-update-server-info synchingrepositories -git-upload-archive synchelpers -git-upload-pack synchelpers -git-var plumbinginterrogators -git-verify-pack plumbinginterrogators -git-verify-tag ancillaryinterrogators -git-whatchanged ancillaryinterrogators -git-write-tree plumbingmanipulators @@ -796,7 +796,7 @@ git-merge-subtree$X: git-merge-recursive$X $(BUILT_INS): git$X $(QUIET_BUILT_IN)$(RM) $@ && ln git$X $@ -common-cmds.h: ./generate-cmdlist.sh +common-cmds.h: ./generate-cmdlist.sh command-list.txt common-cmds.h: $(wildcard Documentation/git-*.txt) $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@ @@ -1138,7 +1138,7 @@ check-docs:: esac ; \ test -f "Documentation/$$v.txt" || \ echo "no doc: $$v"; \ - sed -e '1,/^__DATA__/d' Documentation/cmd-list.perl | \ + sed -e '/^#/d' command-list.txt | \ grep -q "^$$v[ ]" || \ case "$$v" in \ git) ;; \ @@ -1146,9 +1146,9 @@ check-docs:: esac ; \ done; \ ( \ - sed -e '1,/^__DATA__/d' \ + sed -e '/^#/d' \ -e 's/[ ].*//' \ - -e 's/^/listed /' Documentation/cmd-list.perl; \ + -e 's/^/listed /' command-list.txt; \ ls -1 Documentation/git*txt | \ sed -e 's|Documentation/|documented |' \ -e 's/\.txt//'; \ diff --git a/command-list.txt b/command-list.txt new file mode 100644 index 0000000000..d30e86965e --- /dev/null +++ b/command-list.txt @@ -0,0 +1,128 @@ +# List of known git commands. +# command name category [deprecated] [common] +git-add mainporcelain common +git-am mainporcelain +git-annotate ancillaryinterrogators +git-apply plumbingmanipulators +git-archimport foreignscminterface +git-archive mainporcelain +git-bisect mainporcelain common +git-blame ancillaryinterrogators +git-branch mainporcelain common +git-bundle mainporcelain +git-cat-file plumbinginterrogators +git-check-attr purehelpers +git-checkout mainporcelain common +git-checkout-index plumbingmanipulators +git-check-ref-format purehelpers +git-cherry ancillaryinterrogators +git-cherry-pick mainporcelain +git-citool mainporcelain +git-clean mainporcelain +git-clone mainporcelain common +git-commit mainporcelain common +git-commit-tree plumbingmanipulators +git-config ancillarymanipulators +git-count-objects ancillaryinterrogators +git-cvsexportcommit foreignscminterface +git-cvsimport foreignscminterface +git-cvsserver foreignscminterface +git-daemon synchingrepositories +git-describe mainporcelain +git-diff mainporcelain common +git-diff-files plumbinginterrogators +git-diff-index plumbinginterrogators +git-diff-tree plumbinginterrogators +git-fast-import ancillarymanipulators +git-fetch mainporcelain common +git-fetch-pack synchingrepositories +git-filter-branch ancillarymanipulators +git-fmt-merge-msg purehelpers +git-for-each-ref plumbinginterrogators +git-format-patch mainporcelain +git-fsck ancillaryinterrogators +git-gc mainporcelain +git-get-tar-commit-id ancillaryinterrogators +git-grep mainporcelain common +git-gui mainporcelain +git-hash-object plumbingmanipulators +git-http-fetch synchelpers +git-http-push synchelpers +git-imap-send foreignscminterface +git-index-pack plumbingmanipulators +git-init mainporcelain common +git-instaweb ancillaryinterrogators +gitk mainporcelain +git-log mainporcelain common +git-lost-found ancillarymanipulators deprecated +git-ls-files plumbinginterrogators +git-ls-remote plumbinginterrogators +git-ls-tree plumbinginterrogators +git-mailinfo purehelpers +git-mailsplit purehelpers +git-merge mainporcelain common +git-merge-base plumbinginterrogators +git-merge-file plumbingmanipulators +git-merge-index plumbingmanipulators +git-merge-one-file purehelpers +git-mergetool ancillarymanipulators +git-merge-tree ancillaryinterrogators +git-mktag plumbingmanipulators +git-mktree plumbingmanipulators +git-mv mainporcelain common +git-name-rev plumbinginterrogators +git-pack-objects plumbingmanipulators +git-pack-redundant plumbinginterrogators +git-pack-refs ancillarymanipulators +git-parse-remote synchelpers +git-patch-id purehelpers +git-peek-remote purehelpers deprecated +git-prune ancillarymanipulators +git-prune-packed plumbingmanipulators +git-pull mainporcelain common +git-push mainporcelain common +git-quiltimport foreignscminterface +git-read-tree plumbingmanipulators +git-rebase mainporcelain common +git-receive-pack synchelpers +git-reflog ancillarymanipulators +git-relink ancillarymanipulators +git-remote ancillarymanipulators +git-repack ancillarymanipulators +git-request-pull foreignscminterface +git-rerere ancillaryinterrogators +git-reset mainporcelain common +git-revert mainporcelain +git-rev-list plumbinginterrogators +git-rev-parse ancillaryinterrogators +git-rm mainporcelain common +git-runstatus ancillaryinterrogators +git-send-email foreignscminterface +git-send-pack synchingrepositories +git-shell synchelpers +git-shortlog mainporcelain +git-show mainporcelain common +git-show-branch ancillaryinterrogators +git-show-index plumbinginterrogators +git-show-ref plumbinginterrogators +git-sh-setup purehelpers +git-stash mainporcelain +git-status mainporcelain common +git-stripspace purehelpers +git-submodule mainporcelain +git-svn foreignscminterface +git-symbolic-ref plumbingmanipulators +git-tag mainporcelain common +git-tar-tree plumbinginterrogators deprecated +git-unpack-file plumbinginterrogators +git-unpack-objects plumbingmanipulators +git-update-index plumbingmanipulators +git-update-ref plumbingmanipulators +git-update-server-info synchingrepositories +git-upload-archive synchelpers +git-upload-pack synchelpers +git-var plumbinginterrogators +git-verify-pack plumbinginterrogators +git-verify-tag ancillaryinterrogators +git-whatchanged ancillaryinterrogators +git-write-tree plumbingmanipulators diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 1ba27ecf9c..a2913c2a2c 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -9,29 +9,8 @@ struct cmdname_help static struct cmdname_help common_cmds[] = {" -sort <<\EOF | -add -bisect -branch -checkout -clone -commit -diff -fetch -grep -init -log -merge -mv -pull -push -rebase -reset -rm -show -status -tag -EOF +sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt | +sort | while read cmd do sed -n ' |