git-applymbox: Remove command
[git/git.git] / Documentation / cmd-list.perl
CommitLineData
d7907392
JH
1#!/usr/bin/perl -w
2
3use File::Compare qw(compare);
72fe6a59
JH
4
5sub format_one {
6 my ($out, $name) = @_;
7 my ($state, $description);
d7907392 8 $state = 0;
72fe6a59
JH
9 open I, '<', "$name.txt" or die "No such file $name.txt";
10 while (<I>) {
11 if (/^NAME$/) {
12 $state = 1;
13 next;
14 }
15 if ($state == 1 && /^----$/) {
16 $state = 2;
17 next;
18 }
19 next if ($state != 2);
20 chomp;
21 $description = $_;
22 last;
23 }
24 close I;
25 if (!defined $description) {
26 die "No description found in $name.txt";
27 }
28 if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) {
29 print $out "gitlink:$name\[1\]::\n";
30 print $out "\t$text.\n\n";
31 }
32 else {
33 die "Description does not match $name: $description";
34 }
35}
36
37my %cmds = ();
38while (<DATA>) {
39 next if /^#/;
40
41 chomp;
42 my ($name, $cat) = /^(\S+)\s+(.*)$/;
43 push @{$cmds{$cat}}, $name;
44}
45
46for my $cat (qw(ancillaryinterrogators
47 ancillarymanipulators
48 mainporcelain
49 plumbinginterrogators
50 plumbingmanipulators
89bf2077
JH
51 synchingrepositories
52 foreignscminterface
53 purehelpers
54 synchelpers)) {
72fe6a59
JH
55 my $out = "cmds-$cat.txt";
56 open O, '>', "$out+" or die "Cannot open output file $out+";
57 for (@{$cmds{$cat}}) {
58 format_one(\*O, $_);
59 }
60 close O;
d7907392
JH
61
62 if (-f "$out" && compare("$out", "$out+") == 0) {
63 unlink "$out+";
64 }
65 else {
66 print STDERR "$out\n";
67 rename "$out+", "$out";
68 }
72fe6a59
JH
69}
70
71__DATA__
72git-add mainporcelain
73git-am mainporcelain
74git-annotate ancillaryinterrogators
89bf2077 75git-applypatch purehelpers
72fe6a59 76git-apply plumbingmanipulators
89bf2077 77git-archimport foreignscminterface
72fe6a59
JH
78git-archive mainporcelain
79git-bisect mainporcelain
80git-blame ancillaryinterrogators
81git-branch mainporcelain
2e0afafe 82git-bundle mainporcelain
72fe6a59
JH
83git-cat-file plumbinginterrogators
84git-checkout-index plumbingmanipulators
85git-checkout mainporcelain
b568a503 86git-check-attr purehelpers
89bf2077 87git-check-ref-format purehelpers
72fe6a59
JH
88git-cherry ancillaryinterrogators
89git-cherry-pick mainporcelain
90git-clean mainporcelain
91git-clone mainporcelain
92git-commit mainporcelain
93git-commit-tree plumbingmanipulators
94git-convert-objects ancillarymanipulators
95git-count-objects ancillaryinterrogators
89bf2077
JH
96git-cvsexportcommit foreignscminterface
97git-cvsimport foreignscminterface
98git-cvsserver foreignscminterface
99git-daemon synchingrepositories
100git-describe mainporcelain
72fe6a59
JH
101git-diff-files plumbinginterrogators
102git-diff-index plumbinginterrogators
103git-diff mainporcelain
72fe6a59 104git-diff-tree plumbinginterrogators
81f915e7 105git-fast-import ancillarymanipulators
72fe6a59
JH
106git-fetch mainporcelain
107git-fetch-pack synchingrepositories
89bf2077 108git-fmt-merge-msg purehelpers
72fe6a59
JH
109git-for-each-ref plumbinginterrogators
110git-format-patch mainporcelain
df391b19 111git-fsck ancillaryinterrogators
89bf2077 112git-gc mainporcelain
72fe6a59
JH
113git-get-tar-commit-id ancillaryinterrogators
114git-grep mainporcelain
115git-hash-object plumbingmanipulators
89bf2077
JH
116git-http-fetch synchelpers
117git-http-push synchelpers
118git-imap-send foreignscminterface
72fe6a59 119git-index-pack plumbingmanipulators
89bf2077 120git-init mainporcelain
72fe6a59
JH
121git-instaweb ancillaryinterrogators
122gitk mainporcelain
123git-local-fetch synchingrepositories
124git-log mainporcelain
125git-lost-found ancillarymanipulators
126git-ls-files plumbinginterrogators
89bf2077 127git-ls-remote plumbinginterrogators
72fe6a59 128git-ls-tree plumbinginterrogators
89bf2077
JH
129git-mailinfo purehelpers
130git-mailsplit purehelpers
72fe6a59
JH
131git-merge-base plumbinginterrogators
132git-merge-file plumbingmanipulators
133git-merge-index plumbingmanipulators
134git-merge mainporcelain
89bf2077 135git-merge-one-file purehelpers
72fe6a59 136git-merge-tree ancillaryinterrogators
86952cda 137git-mergetool ancillarymanipulators
72fe6a59
JH
138git-mktag plumbingmanipulators
139git-mktree plumbingmanipulators
140git-mv mainporcelain
141git-name-rev plumbinginterrogators
142git-pack-objects plumbingmanipulators
143git-pack-redundant plumbinginterrogators
89bf2077
JH
144git-pack-refs ancillarymanipulators
145git-parse-remote synchelpers
146git-patch-id purehelpers
147git-peek-remote purehelpers
72fe6a59
JH
148git-prune ancillarymanipulators
149git-prune-packed plumbingmanipulators
150git-pull mainporcelain
151git-push mainporcelain
89bf2077 152git-quiltimport foreignscminterface
72fe6a59
JH
153git-read-tree plumbingmanipulators
154git-rebase mainporcelain
89bf2077 155git-receive-pack synchelpers
72fe6a59
JH
156git-reflog ancillarymanipulators
157git-relink ancillarymanipulators
89bf2077 158git-repack ancillarymanipulators
e0d10e1c 159git-config ancillarymanipulators
727d38d7 160git-remote ancillarymanipulators
89bf2077
JH
161git-request-pull foreignscminterface
162git-rerere ancillaryinterrogators
72fe6a59 163git-reset mainporcelain
72fe6a59
JH
164git-revert mainporcelain
165git-rev-list plumbinginterrogators
166git-rev-parse ancillaryinterrogators
167git-rm mainporcelain
168git-runstatus ancillaryinterrogators
89bf2077 169git-send-email foreignscminterface
72fe6a59 170git-send-pack synchingrepositories
89bf2077 171git-shell synchelpers
72fe6a59
JH
172git-shortlog mainporcelain
173git-show mainporcelain
89bf2077 174git-show-branch ancillaryinterrogators
72fe6a59
JH
175git-show-index plumbinginterrogators
176git-show-ref plumbinginterrogators
89bf2077 177git-sh-setup purehelpers
72fe6a59
JH
178git-ssh-fetch synchingrepositories
179git-ssh-upload synchingrepositories
180git-status mainporcelain
89bf2077
JH
181git-stripspace purehelpers
182git-svn foreignscminterface
183git-svnimport foreignscminterface
184git-symbolic-ref plumbingmanipulators
185git-tag mainporcelain
72fe6a59
JH
186git-tar-tree plumbinginterrogators
187git-unpack-file plumbinginterrogators
188git-unpack-objects plumbingmanipulators
189git-update-index plumbingmanipulators
89bf2077 190git-update-ref plumbingmanipulators
72fe6a59 191git-update-server-info synchingrepositories
89bf2077
JH
192git-upload-archive synchelpers
193git-upload-pack synchelpers
72fe6a59
JH
194git-var plumbinginterrogators
195git-verify-pack plumbinginterrogators
89bf2077
JH
196git-verify-tag ancillaryinterrogators
197git-whatchanged ancillaryinterrogators
72fe6a59 198git-write-tree plumbingmanipulators