1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 22:26:26 +02:00
git/generate-cmdlist.sh
Junio C Hamano 4175e9e3a8 More static
There still are quite a few symbols that ought to be static.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13 02:02:10 -07:00

52 lines
551 B
Bash
Executable File

#!/bin/sh
echo "/* Automatically generated by $0 */
struct cmdname_help
{
char name[16];
char help[80];
};
static struct cmdname_help common_cmds[] = {"
sort <<\EOF |
add
apply
archive
bisect
branch
checkout
cherry-pick
clone
commit
diff
fetch
grep
init
log
merge
mv
prune
pull
push
rebase
reset
revert
rm
show
show-branch
status
tag
EOF
while read cmd
do
sed -n '
/NAME/,/git-'"$cmd"'/H
${
x
s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
p
}' "Documentation/git-$cmd.txt"
done
echo "};"