xdiff: Show function names in hunk headers.
[git/dscho.git] / generate-cmdlist.sh
blob6c59dbd68fc15ddd392086d375c8ecfc35e30c1a
1 #!/bin/sh
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help
6 char name[16];
7 char help[64];
8 };
10 struct cmdname_help common_cmds[] = {"
12 sort <<\EOF |
13 add
14 apply
15 bisect
16 branch
17 checkout
18 cherry-pick
19 clone
20 commit
21 diff
22 fetch
23 grep
24 init-db
25 log
26 merge
28 prune
29 pull
30 push
31 rebase
32 reset
33 revert
35 show
36 show-branch
37 status
38 tag
39 verify-tag
40 whatchanged
41 EOF
42 while read cmd
44 sed -n '
45 /NAME/,/git-'"$cmd"'/H
48 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
50 }' "Documentation/git-$cmd.txt"
51 done
52 echo "};"