Skip to content

Commit 460cccd

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: sample commit-msg hook: no silent exit on duplicate Signed-off-by lines Fix regex pattern in commit-msg
2 parents 89b0c4b + 9a1ae9a commit 460cccd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/hooks--commit-msg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@
1111
# This example catches duplicate Signed-off-by lines.
1212

1313
test "" = "$(grep '^Signed-off-by: ' "$1" |
14-
sort | uniq -c | sed -e '/^[ ]*1 /d')"
14+
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
15+
echo >&2 Duplicate Signed-off-by lines.
16+
exit 1
17+
}
18+

0 commit comments

Comments
 (0)