blob: 17df47b95067449f03039b8ecd7715701302fa68 [file] [log] [blame]
Fredrik Kuivinena87cd022006-03-09 17:24:19 +01001#!/bin/sh
2
3echo "/* Automatically generated by $0 */
4struct cmdname_help
5{
6 char name[16];
Johannes Schindelin5d7eeee2006-12-14 11:31:05 +01007 char help[80];
Fredrik Kuivinena87cd022006-03-09 17:24:19 +01008};
9
Junio C Hamano4175e9e2007-06-13 01:42:05 -070010static struct cmdname_help common_cmds[] = {"
Fredrik Kuivinena87cd022006-03-09 17:24:19 +010011
12sort <<\EOF |
13add
14apply
Franck Bui-Huu4df096a2006-09-07 15:12:02 +020015archive
Fredrik Kuivinena87cd022006-03-09 17:24:19 +010016bisect
17branch
18checkout
19cherry-pick
20clone
21commit
22diff
23fetch
24grep
Nicolas Pitre5c94f872007-01-12 16:01:46 -050025init
Fredrik Kuivinena87cd022006-03-09 17:24:19 +010026log
27merge
28mv
29prune
30pull
31push
32rebase
33reset
34revert
35rm
36show
37show-branch
38status
39tag
Fredrik Kuivinena87cd022006-03-09 17:24:19 +010040EOF
41while read cmd
42do
Junio C Hamanofd662dd2006-03-19 23:54:45 -080043 sed -n '
44 /NAME/,/git-'"$cmd"'/H
45 ${
46 x
47 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
48 p
49 }' "Documentation/git-$cmd.txt"
Fredrik Kuivinena87cd022006-03-09 17:24:19 +010050done
51echo "};"