summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e77235e)
raw | patch | inline | side by side (parent: e77235e)
author | Luben Tuikov <ltuikov@yahoo.com> | |
Sun, 13 Aug 2006 08:41:22 +0000 (01:41 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 13 Aug 2006 08:46:28 +0000 (01:46 -0700) |
git-commit would silently exit if duplicate Signed-off-by
lines were found. Users of git-commit would not know it,
unless they checked '$?'. This patch makes git-commit
actually print out a message that nothing was commited
since duplicate Signed-off-lines were found.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
lines were found. Users of git-commit would not know it,
unless they checked '$?'. This patch makes git-commit
actually print out a message that nothing was commited
since duplicate Signed-off-lines were found.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
templates/hooks--commit-msg | patch | blob | history |
index 23617f390611f5221149ec1b9bbc5d72092fd04d..0b906caa98f3d4deced75d196d969d7216d31961 100644 (file)
# 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
+}
+