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> --- git-commit.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-commit.sh +1 −1
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