aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-13 22:58:23 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-13 22:58:23 -0700
commit460cccd3ba1d38fd64c9e83e40d58bcf3e9d7d2c (patch)
treebe398ecd58e7d7132ff93ac42cb223e1eddd3f76
parent89b0c4b5a3a9d026d9adb30d4e896965e480725e (diff)
parent9a1ae9ab03abaffc977421f182997f3e735e7098 (diff)
downloadgit-460cccd3ba1d38fd64c9e83e40d58bcf3e9d7d2c.tar.gz
git-460cccd3ba1d38fd64c9e83e40d58bcf3e9d7d2c.tar.xz
Merge branch 'maint'
* maint: sample commit-msg hook: no silent exit on duplicate Signed-off-by lines Fix regex pattern in commit-msg
-rw-r--r--templates/hooks--commit-msg6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/hooks--commit-msg b/templates/hooks--commit-msg
index 643822d23..0b906caa9 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
+}
+