@matheusbsbs / matheus-bagliano / commits / 72fe6a5989
Fork 0

Documentation: Generate command lists.

This moves the source of the list of commands and categorization to the end of Documentation/cmd-list.perl, so that re-categorization and re-ordering would become easier to manage. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 18, 2007 at 16:02 UTC 72fe6a59890870ed9c3e9e1e6381fc0d7ba75fe4
9 files changed +196 -379
Documentation/.gitignore
+1
@@ -5,3 +5,4 @@
5 howto-index.txt
6 doc.dep
7 README
8 +cmds-*.txt
Documentation/Makefile
+11 -1
@@ -71,11 +71,21 @@ doc.dep : $(wildcard *.txt) build-docdep.perl
71
72 -include doc.dep
73
74 -git.7 git.html: git.txt core-intro.txt
74 +cmds_txt = cmds-ancillaryinterrogators.txt \
75 + cmds-ancillarymanipulators.txt \
76 + cmds-mainporcelain.txt \
77 + cmds-plumbinginterrogators.txt \
78 + cmds-plumbingmanipulators.txt \
79 + cmds-synchingrepositories.txt
80 +
81 +$(cmds_txt): cmd-list.perl $(MAN1_TXT) $(MAN7_TXT)
82 + perl ./cmd-list.perl
83
84 +git.7 git.html: git.txt core-intro.txt
85
86 clean:
87 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
88 + rm -f $(cmds_txt)
89
90 %.html : %.txt
91 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
Documentation/cmd-list.perl new
+184
@@ -0,0 +1,184 @@
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
48 + synchingrepositories)) {
49 + my $out = "cmds-$cat.txt";
50 + open O, '>', "$out+" or die "Cannot open output file $out+";
51 + for (@{$cmds{$cat}}) {
52 + format_one(\*O, $_);
53 + }
54 + close O;
55 + rename "$out+", "$out";
56 +}
57 +
58 +__DATA__
59 +git-add mainporcelain
60 +git-am mainporcelain
61 +git-annotate ancillaryinterrogators
62 +git-applymbox mainporcelain
63 +git-applypatch ancillarymanipulators
64 +git-apply plumbingmanipulators
65 +git-archimport ancillarymanipulators
66 +git-archive mainporcelain
67 +git-bisect mainporcelain
68 +git-blame ancillaryinterrogators
69 +git-branch mainporcelain
70 +git-cat-file plumbinginterrogators
71 +git-checkout-index plumbingmanipulators
72 +git-checkout mainporcelain
73 +git-check-ref-format ancillaryinterrogators
74 +git-cherry ancillaryinterrogators
75 +git-cherry-pick mainporcelain
76 +git-clean mainporcelain
77 +git-clone mainporcelain
78 +git-commit mainporcelain
79 +git-commit-tree plumbingmanipulators
80 +git-convert-objects ancillarymanipulators
81 +git-count-objects ancillaryinterrogators
82 +git-cvsexportcommit ancillarymanipulators
83 +git-cvsimport ancillarymanipulators
84 +git-cvsserver ancillarymanipulators
85 +git-daemon ancillaryinterrogators
86 +git-describe plumbinginterrogators
87 +git-diff-files plumbinginterrogators
88 +git-diff-index plumbinginterrogators
89 +git-diff mainporcelain
90 +git-diff-stages plumbinginterrogators
91 +git-diff-tree plumbinginterrogators
92 +git-fetch mainporcelain
93 +git-fetch-pack synchingrepositories
94 +git-fmt-merge-msg ancillaryinterrogators
95 +git-for-each-ref plumbinginterrogators
96 +git-format-patch mainporcelain
97 +git-fsck-objects plumbinginterrogators
98 +git-gc ancillarymanipulators
99 +git-get-tar-commit-id ancillaryinterrogators
100 +git-grep mainporcelain
101 +git-hash-object plumbingmanipulators
102 +git-http-fetch synchingrepositories
103 +git-http-push synchingrepositories
104 +git-imap-send ancillaryinterrogators
105 +git-index-pack plumbingmanipulators
106 +git-init plumbingmanipulators
107 +git-instaweb ancillaryinterrogators
108 +gitk mainporcelain
109 +git-local-fetch synchingrepositories
110 +git-log mainporcelain
111 +git-lost-found ancillarymanipulators
112 +git-ls-files plumbinginterrogators
113 +git-ls-remote mainporcelain
114 +git-ls-tree plumbinginterrogators
115 +git-mailinfo ancillaryinterrogators
116 +git-mailsplit ancillaryinterrogators
117 +git-merge-base plumbinginterrogators
118 +git-merge-file plumbingmanipulators
119 +git-merge-index plumbingmanipulators
120 +git-merge mainporcelain
121 +git-merge-one-file ancillarymanipulators
122 +git-merge-tree ancillaryinterrogators
123 +git-mktag plumbingmanipulators
124 +git-mktree plumbingmanipulators
125 +git-mv mainporcelain
126 +git-name-rev plumbinginterrogators
127 +git-pack-objects plumbingmanipulators
128 +git-pack-redundant plumbinginterrogators
129 +git-pack-refs mainporcelain
130 +git-parse-remote ancillaryinterrogators
131 +git-patch-id ancillaryinterrogators
132 +git-peek-remote synchingrepositories
133 +git-prune ancillarymanipulators
134 +git-prune-packed plumbingmanipulators
135 +git-pull mainporcelain
136 +git-push mainporcelain
137 +git-quiltimport ancillarymanipulators
138 +git-read-tree plumbingmanipulators
139 +git-rebase mainporcelain
140 +git-receive-pack synchingrepositories
141 +git-reflog ancillarymanipulators
142 +git-relink ancillarymanipulators
143 +git-repack mainporcelain
144 +git-repo-config plumbingmanipulators
145 +git-request-pull ancillaryinterrogators
146 +git-rerere mainporcelain
147 +git-reset mainporcelain
148 +git-resolve mainporcelain
149 +git-revert mainporcelain
150 +git-rev-list plumbinginterrogators
151 +git-rev-parse ancillaryinterrogators
152 +git-rm mainporcelain
153 +git-runstatus ancillaryinterrogators
154 +git-send-email ancillaryinterrogators
155 +git-send-pack synchingrepositories
156 +git-shell synchingrepositories
157 +git-shortlog mainporcelain
158 +git-show mainporcelain
159 +git-show-branch mainporcelain
160 +git-show-index plumbinginterrogators
161 +git-show-ref plumbinginterrogators
162 +git-sh-setup ancillarymanipulators
163 +git-ssh-fetch synchingrepositories
164 +git-ssh-upload synchingrepositories
165 +git-status mainporcelain
166 +git-stripspace ancillaryinterrogators
167 +git-svn ancillarymanipulators
168 +git-svnimport ancillarymanipulators
169 +git-symbolic-ref ancillaryinterrogators
170 +git-symbolic-ref ancillarymanipulators
171 +git-tag ancillarymanipulators
172 +git-tar-tree plumbinginterrogators
173 +git-unpack-file plumbinginterrogators
174 +git-unpack-objects plumbingmanipulators
175 +git-update-index plumbingmanipulators
176 +git-update-ref ancillarymanipulators
177 +git-update-server-info synchingrepositories
178 +git-upload-archive synchingrepositories
179 +git-upload-pack synchingrepositories
180 +git-var plumbinginterrogators
181 +git-verify-pack plumbinginterrogators
182 +git-verify-tag mainporcelain
183 +git-whatchanged mainporcelain
184 +git-write-tree plumbingmanipulators
Documentation/cmds-ancillaryinterrogators.txt deleted
-63
@@ -1,63 +0,0 @@
1 -gitlink:git-annotate[1]::
2 - Annotate file lines with commit info.
3 -
4 -gitlink:git-blame[1]::
5 - Show what revision and author last modified each line of a file.
6 -
7 -gitlink:git-check-ref-format[1]::
8 - Make sure ref name is well formed.
9 -
10 -gitlink:git-cherry[1]::
11 - Find commits not merged upstream.
12 -
13 -gitlink:git-count-objects[1]::
14 - Count unpacked number of objects and their disk consumption.
15 -
16 -gitlink:git-daemon[1]::
17 - A really simple server for git repositories.
18 -
19 -gitlink:git-fmt-merge-msg[1]::
20 - Produce a merge commit message.
21 -
22 -gitlink:git-get-tar-commit-id[1]::
23 - Extract commit ID from an archive created using git-tar-tree.
24 -
25 -gitlink:git-imap-send[1]::
26 - Dump a mailbox from stdin into an imap folder.
27 -
28 -gitlink:git-instaweb[1]::
29 - Instantly browse your working repository in gitweb.
30 -
31 -gitlink:git-mailinfo[1]::
32 - Extracts patch and authorship from a single e-mail message.
33 -
34 -gitlink:git-mailsplit[1]::
35 - Simple UNIX mbox splitter program.
36 -
37 -gitlink:git-merge-tree[1]::
38 - Show three-way merge without touching index.
39 -
40 -gitlink:git-parse-remote[1]::
41 - Routines to help parsing remote repository access parameters.
42 -
43 -gitlink:git-patch-id[1]::
44 - Compute unique ID for a patch.
45 -
46 -gitlink:git-request-pull[1]::
47 - Generates a summary of pending changes.
48 -
49 -gitlink:git-rev-parse[1]::
50 - Pick out and massage parameters.
51 -
52 -gitlink:git-runstatus[1]::
53 - A helper for git-status and git-commit.
54 -
55 -gitlink:git-send-email[1]::
56 - Send a collection of patches as emails.
57 -
58 -gitlink:git-stripspace[1]::
59 - Filter out empty lines.
60 -
61 -gitlink:git-symbolic-ref[1]::
62 - Read and modify symbolic refs.
63 -
Documentation/cmds-ancillarymanipulators.txt deleted
-57
@@ -1,57 +0,0 @@
1 -gitlink:git-applypatch[1]::
2 - Apply one patch extracted from an e-mail.
3 -
4 -gitlink:git-archimport[1]::
5 - Import an Arch repository into git.
6 -
7 -gitlink:git-convert-objects[1]::
8 - Converts old-style git repository.
9 -
10 -gitlink:git-cvsexportcommit[1]::
11 - Export a single commit to a CVS checkout.
12 -
13 -gitlink:git-cvsimport[1]::
14 - Salvage your data out of another SCM people love to hate.
15 -
16 -gitlink:git-cvsserver[1]::
17 - A CVS server emulator for git.
18 -
19 -gitlink:git-gc[1]::
20 - Cleanup unnecessary files and optimize the local repository.
21 -
22 -gitlink:git-lost-found[1]::
23 - Recover lost refs that luckily have not yet been pruned.
24 -
25 -gitlink:git-merge-one-file[1]::
26 - The standard helper program to use with git-merge-index.
27 -
28 -gitlink:git-prune[1]::
29 - Prunes all unreachable objects from the object database.
30 -
31 -gitlink:git-quiltimport[1]::
32 - Applies a quilt patchset onto the current branch.
33 -
34 -gitlink:git-reflog[1]::
35 - Manage reflog information.
36 -
37 -gitlink:git-relink[1]::
38 - Hardlink common objects in local repositories.
39 -
40 -gitlink:git-sh-setup[1]::
41 - Common git shell script setup code.
42 -
43 -gitlink:git-svn[1]::
44 - Bidirectional operation between a single Subversion branch and git.
45 -
46 -gitlink:git-svnimport[1]::
47 - Import a SVN repository into git.
48 -
49 -gitlink:git-symbolic-ref[1]::
50 - Read and modify symbolic refs.
51 -
52 -gitlink:git-tag[1]::
53 - Create or verify a tag object signed with GPG.
54 -
55 -gitlink:git-update-ref[1]::
56 - Update the object name stored in a ref safely.
57 -
Documentation/cmds-mainporcelain.txt deleted
-108
@@ -1,108 +0,0 @@
1 -gitlink:git-add[1]::
2 - Add file contents to the changeset to be committed next.
3 -
4 -gitlink:git-am[1]::
5 - Apply a series of patches from a mailbox.
6 -
7 -gitlink:git-applymbox[1]::
8 - Apply a series of patches in a mailbox.
9 -
10 -gitlink:git-archive[1]::
11 - Creates an archive of files from a named tree.
12 -
13 -gitlink:git-bisect[1]::
14 - Find the change that introduced a bug by binary search.
15 -
16 -gitlink:git-branch[1]::
17 - List, create, or delete branches.
18 -
19 -gitlink:git-checkout[1]::
20 - Checkout and switch to a branch.
21 -
22 -gitlink:git-cherry-pick[1]::
23 - Apply the change introduced by an existing commit.
24 -
25 -gitlink:git-clean[1]::
26 - Remove untracked files from the working tree.
27 -
28 -gitlink:git-clone[1]::
29 - Clones a repository into a new directory.
30 -
31 -gitlink:git-commit[1]::
32 - Record changes to the repository.
33 -
34 -gitlink:git-diff[1]::
35 - Show changes between commits, commit and working tree, etc.
36 -
37 -gitlink:git-fetch[1]::
38 - Download objects and refs from another repository.
39 -
40 -gitlink:git-format-patch[1]::
41 - Prepare patches for e-mail submission.
42 -
43 -gitlink:git-grep[1]::
44 - Print lines matching a pattern.
45 -
46 -gitlink:gitk[1]::
47 - The git repository browser.
48 -
49 -gitlink:git-log[1]::
50 - Show commit logs.
51 -
52 -gitlink:git-ls-remote[1]::
53 - List references in a remote repository.
54 -
55 -gitlink:git-merge[1]::
56 - Join two or more development histories together.
57 -
58 -gitlink:git-mv[1]::
59 - Move or rename a file, a directory, or a symlink.
60 -
61 -gitlink:git-pack-refs[1]::
62 - Pack heads and tags for efficient repository access.
63 -
64 -gitlink:git-pull[1]::
65 - Fetch from and merge with another repository or a local branch.
66 -
67 -gitlink:git-push[1]::
68 - Update remote refs along with associated objects.
69 -
70 -gitlink:git-rebase[1]::
71 - Forward-port local commits to the updated upstream head.
72 -
73 -gitlink:git-repack[1]::
74 - Pack unpacked objects in a repository.
75 -
76 -gitlink:git-rerere[1]::
77 - Reuse recorded resolution of conflicted merges.
78 -
79 -gitlink:git-reset[1]::
80 - Reset current HEAD to the specified state.
81 -
82 -gitlink:git-resolve[1]::
83 - Merge two commits.
84 -
85 -gitlink:git-revert[1]::
86 - Revert an existing commit.
87 -
88 -gitlink:git-rm[1]::
89 - Remove files from the working tree and from the index.
90 -
91 -gitlink:git-shortlog[1]::
92 - Summarize 'git log' output.
93 -
94 -gitlink:git-show[1]::
95 - Show various types of objects.
96 -
97 -gitlink:git-show-branch[1]::
98 - Show branches and their commits.
99 -
100 -gitlink:git-status[1]::
101 - Show the working tree status.
102 -
103 -gitlink:git-verify-tag[1]::
104 - Check the GPG signature of tag.
105 -
106 -gitlink:git-whatchanged[1]::
107 - Show logs with difference each commit introduces.
108 -
Documentation/cmds-plumbinginterrogators.txt deleted
-60
@@ -1,60 +0,0 @@
1 -gitlink:git-cat-file[1]::
2 - Provide content or type/size information for repository objects.
3 -
4 -gitlink:git-describe[1]::
5 - Show the most recent tag that is reachable from a commit.
6 -
7 -gitlink:git-diff-files[1]::
8 - Compares files in the working tree and the index.
9 -
10 -gitlink:git-diff-index[1]::
11 - Compares content and mode of blobs between the index and repository.
12 -
13 -gitlink:git-diff-stages[1]::
14 - Compares two merge stages in the index.
15 -
16 -gitlink:git-diff-tree[1]::
17 - Compares the content and mode of blobs found via two tree objects.
18 -
19 -gitlink:git-for-each-ref[1]::
20 - Output information on each ref.
21 -
22 -gitlink:git-fsck-objects[1]::
23 - Verifies the connectivity and validity of the objects in the database.
24 -
25 -gitlink:git-ls-files[1]::
26 - Show information about files in the index and the working tree.
27 -
28 -gitlink:git-ls-tree[1]::
29 - List the contents of a tree object.
30 -
31 -gitlink:git-merge-base[1]::
32 - Find as good common ancestors as possible for a merge.
33 -
34 -gitlink:git-name-rev[1]::
35 - Find symbolic names for given revs.
36 -
37 -gitlink:git-pack-redundant[1]::
38 - Find redundant pack files.
39 -
40 -gitlink:git-rev-list[1]::
41 - Lists commit objects in reverse chronological order.
42 -
43 -gitlink:git-show-index[1]::
44 - Show packed archive index.
45 -
46 -gitlink:git-show-ref[1]::
47 - List references in a local repository.
48 -
49 -gitlink:git-tar-tree[1]::
50 - Create a tar archive of the files in the named tree object.
51 -
52 -gitlink:git-unpack-file[1]::
53 - Creates a temporary file with a blob's contents.
54 -
55 -gitlink:git-var[1]::
56 - Show a git logical variable.
57 -
58 -gitlink:git-verify-pack[1]::
59 - Validate packed git archive files.
60 -
Documentation/cmds-plumbingmanipulators.txt deleted
-51
@@ -1,51 +0,0 @@
1 -gitlink:git-apply[1]::
2 - Apply a patch on a git index file and a working tree.
3 -
4 -gitlink:git-checkout-index[1]::
5 - Copy files from the index to the working tree.
6 -
7 -gitlink:git-commit-tree[1]::
8 - Create a new commit object.
9 -
10 -gitlink:git-hash-object[1]::
11 - Compute object ID and optionally creates a blob from a file.
12 -
13 -gitlink:git-index-pack[1]::
14 - Build pack index file for an existing packed archive.
15 -
16 -gitlink:git-init[1]::
17 - Create an empty git repository or reinitialize an existing one.
18 -
19 -gitlink:git-merge-file[1]::
20 - Run a three-way file merge.
21 -
22 -gitlink:git-merge-index[1]::
23 - Run a merge for files needing merging.
24 -
25 -gitlink:git-mktag[1]::
26 - Creates a tag object.
27 -
28 -gitlink:git-mktree[1]::
29 - Build a tree-object from ls-tree formatted text.
30 -
31 -gitlink:git-pack-objects[1]::
32 - Create a packed archive of objects.
33 -
34 -gitlink:git-prune-packed[1]::
35 - Remove extra objects that are already in pack files.
36 -
37 -gitlink:git-read-tree[1]::
38 - Reads tree information into the index.
39 -
40 -gitlink:git-repo-config[1]::
41 - Get and set repository or global options.
42 -
43 -gitlink:git-unpack-objects[1]::
44 - Unpack objects from a packed archive.
45 -
46 -gitlink:git-update-index[1]::
47 - Register file contents in the working tree to the index.
48 -
49 -gitlink:git-write-tree[1]::
50 - Create a tree object from the current index.
51 -
Documentation/cmds-synchingrepositories.txt deleted
-39
@@ -1,39 +0,0 @@
1 -gitlink:git-fetch-pack[1]::
2 - Receive missing objects from another repository.
3 -
4 -gitlink:git-http-fetch[1]::
5 - Download from a remote git repository via HTTP.
6 -
7 -gitlink:git-http-push[1]::
8 - Push objects over HTTP/DAV to another repository.
9 -
10 -gitlink:git-local-fetch[1]::
11 - Duplicate another git repository on a local system.
12 -
13 -gitlink:git-peek-remote[1]::
14 - List the references in a remote repository.
15 -
16 -gitlink:git-receive-pack[1]::
17 - Receive what is pushed into the repository.
18 -
19 -gitlink:git-send-pack[1]::
20 - Push objects over git protocol to another reposiotory.
21 -
22 -gitlink:git-shell[1]::
23 - Restricted login shell for GIT-only SSH access.
24 -
25 -gitlink:git-ssh-fetch[1]::
26 - Fetch from a remote repository over ssh connection.
27 -
28 -gitlink:git-ssh-upload[1]::
29 - Push to a remote repository over ssh connection.
30 -
31 -gitlink:git-update-server-info[1]::
32 - Update auxiliary info file to help dumb servers.
33 -
34 -gitlink:git-upload-archive[1]::
35 - Send archive back to git-archive.
36 -
37 -gitlink:git-upload-pack[1]::
38 - Send objects packed back to git-fetch-pack.
39 -