From: Nguyễn Thái Ngọc Duy Date: Sun, 30 Nov 2008 10:54:31 +0000 (+0700) Subject: generate-cmdlist.sh: avoid selecting synopsis at wrong place X-Git-Tag: v1.6.1-rc1~5^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=16d258332e35dad58c0b22cd4d5c0e63ebb25328;p=git.git generate-cmdlist.sh: avoid selecting synopsis at wrong place 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 Signed-off-by: Junio C Hamano --- diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index a2913c2a2..75c68d948 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -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"},/