Skip to content

Commit 16d2583

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 539eec4 commit 16d2583

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate-cmdlist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sort |
1414
while read cmd
1515
do
1616
sed -n '
17-
/NAME/,/git-'"$cmd"'/H
17+
/^NAME/,/git-'"$cmd"'/H
1818
${
1919
x
2020
s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/

0 commit comments

Comments
 (0)