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