]> git.ipfire.org Git - thirdparty/git.git/commitdiff
generate-cmdlist.sh: avoid selecting synopsis at wrong place
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2008 10:54:31 +0000 (17:54 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2008 02:16:32 +0000 (18:16 -0800)
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>
generate-cmdlist.sh

index a2913c2a2cd1ec158157ada3e2deb666892b734b..75c68d948fd3105272f893ff2f901007519f62f5 100755 (executable)
@@ -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"},/