[PATCH] git-commit: no silent exit on duplicate Signed-off-by lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 git-commit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-commit.sh b/git-commit.sh
index 4cf3fab..edfd8c0 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -690,7 +690,7 @@ case "$verify" in
 t)
 	if test -x "$GIT_DIR"/hooks/commit-msg
 	then
-		"$GIT_DIR"/hooks/commit-msg "$GIT_DIR"/COMMIT_EDITMSG || exit
+		"$GIT_DIR"/hooks/commit-msg "$GIT_DIR"/COMMIT_EDITMSG || die "Duplicate Signed-off-by lines -- nothing commited"
 	fi
 esac
 
-- 
1.4.2.g73dbd

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]