Skip to content

Commit

Permalink
generate-cmdlist.sh: avoid selecting synopsis at wrong place
Browse files Browse the repository at this point in the history
In "common" man pages there is luckily no "NAME" anywhere except at
beginning of documents. If there is another "NAME", sed could
mis-select it and lead to common-cmds.h corruption. So better nail it
at beginning of line, which would reduce corruption chance.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Dec 1, 2008
1 parent 539eec4 commit 16d2583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generate-cmdlist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sort |
while read cmd
do
sed -n '
/NAME/,/git-'"$cmd"'/H
/^NAME/,/git-'"$cmd"'/H
${
x
s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
Expand Down

0 comments on commit 16d2583

Please sign in to comment.