add reflog when moving HEAD to a new branch
[git/dkf.git] / Documentation / cmd-list.perl
blob744db82413fbd31f4dd906c2a46702a20953b6c5
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-cat-file plumbinginterrogators
74 git-checkout-index plumbingmanipulators
75 git-checkout mainporcelain
76 git-check-ref-format purehelpers
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
85 git-cvsexportcommit foreignscminterface
86 git-cvsimport foreignscminterface
87 git-cvsserver foreignscminterface
88 git-daemon synchingrepositories
89 git-describe mainporcelain
90 git-diff-files plumbinginterrogators
91 git-diff-index plumbinginterrogators
92 git-diff mainporcelain
93 git-diff-stages plumbinginterrogators
94 git-diff-tree plumbinginterrogators
95 git-fetch mainporcelain
96 git-fetch-pack synchingrepositories
97 git-fmt-merge-msg purehelpers
98 git-for-each-ref plumbinginterrogators
99 git-format-patch mainporcelain
100 git-fsck-objects ancillaryinterrogators
101 git-gc mainporcelain
102 git-get-tar-commit-id ancillaryinterrogators
103 git-grep mainporcelain
104 git-hash-object plumbingmanipulators
105 git-http-fetch synchelpers
106 git-http-push synchelpers
107 git-imap-send foreignscminterface
108 git-index-pack plumbingmanipulators
109 git-init mainporcelain
110 git-instaweb ancillaryinterrogators
111 gitk mainporcelain
112 git-local-fetch synchingrepositories
113 git-log mainporcelain
114 git-lost-found ancillarymanipulators
115 git-ls-files plumbinginterrogators
116 git-ls-remote plumbinginterrogators
117 git-ls-tree plumbinginterrogators
118 git-mailinfo purehelpers
119 git-mailsplit purehelpers
120 git-merge-base plumbinginterrogators
121 git-merge-file plumbingmanipulators
122 git-merge-index plumbingmanipulators
123 git-merge mainporcelain
124 git-merge-one-file purehelpers
125 git-merge-tree ancillaryinterrogators
126 git-mktag plumbingmanipulators
127 git-mktree plumbingmanipulators
128 git-mv mainporcelain
129 git-name-rev plumbinginterrogators
130 git-pack-objects plumbingmanipulators
131 git-pack-redundant plumbinginterrogators
132 git-pack-refs ancillarymanipulators
133 git-parse-remote synchelpers
134 git-patch-id purehelpers
135 git-peek-remote purehelpers
136 git-prune ancillarymanipulators
137 git-prune-packed plumbingmanipulators
138 git-pull mainporcelain
139 git-push mainporcelain
140 git-quiltimport foreignscminterface
141 git-read-tree plumbingmanipulators
142 git-rebase mainporcelain
143 git-receive-pack synchelpers
144 git-reflog ancillarymanipulators
145 git-relink ancillarymanipulators
146 git-repack ancillarymanipulators
147 git-repo-config ancillarymanipulators
148 git-request-pull foreignscminterface
149 git-rerere ancillaryinterrogators
150 git-reset mainporcelain
151 git-resolve mainporcelain
152 git-revert mainporcelain
153 git-rev-list plumbinginterrogators
154 git-rev-parse ancillaryinterrogators
155 git-rm mainporcelain
156 git-runstatus ancillaryinterrogators
157 git-send-email foreignscminterface
158 git-send-pack synchingrepositories
159 git-shell synchelpers
160 git-shortlog mainporcelain
161 git-show mainporcelain
162 git-show-branch ancillaryinterrogators
163 git-show-index plumbinginterrogators
164 git-show-ref plumbinginterrogators
165 git-sh-setup purehelpers
166 git-ssh-fetch synchingrepositories
167 git-ssh-upload synchingrepositories
168 git-status mainporcelain
169 git-stripspace purehelpers
170 git-svn foreignscminterface
171 git-svnimport foreignscminterface
172 git-symbolic-ref plumbingmanipulators
173 git-tag mainporcelain
174 git-tar-tree plumbinginterrogators
175 git-unpack-file plumbinginterrogators
176 git-unpack-objects plumbingmanipulators
177 git-update-index plumbingmanipulators
178 git-update-ref plumbingmanipulators
179 git-update-server-info synchingrepositories
180 git-upload-archive synchelpers
181 git-upload-pack synchelpers
182 git-var plumbinginterrogators
183 git-verify-pack plumbinginterrogators
184 git-verify-tag ancillaryinterrogators
185 git-whatchanged ancillaryinterrogators
186 git-write-tree plumbingmanipulators