Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  sample commit-msg hook: no silent exit on duplicate Signed-off-by lines
  Fix regex pattern in commit-msg
  • Loading branch information
Junio C Hamano committed Aug 14, 2006
2 parents 89b0c4b + 9a1ae9a commit 460cccd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/hooks--commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 460cccd

Please sign in to comment.