From 16d258332e35dad58c0b22cd4d5c0e63ebb25328 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 30 Nov 2008 17:54:31 +0700 Subject: [PATCH] generate-cmdlist.sh: avoid selecting synopsis at wrong place MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- generate-cmdlist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"},/ -- 2.30.2