From: Junio C Hamano Date: Mon, 14 Aug 2006 05:58:23 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.4.3-rc1~265 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/460cccd3ba1d38fd64c9e83e40d58bcf3e9d7d2c?hp=89b0c4b5a3a9d026d9adb30d4e896965e480725e Merge branch 'maint' * maint: sample commit-msg hook: no silent exit on duplicate Signed-off-by lines Fix regex pattern in commit-msg --- diff --git a/templates/hooks--commit-msg b/templates/hooks--commit-msg index 643822d235..0b906caa98 100644 --- a/templates/hooks--commit-msg +++ b/templates/hooks--commit-msg @@ -11,4 +11,8 @@ # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1 /d')" + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} +