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