git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
LTLuben Tuikov <ltuikov@yahoo.com>
Date
Aug 13, 2006, 08:03 UTC
Message-ID
<20060813080328.14584.qmail@web31805.mail.mud.yahoo.com>

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(-)
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
Next: Junio C Hamano
Message 1 of 3 in “git-commit: no silent exit on duplicate Signed-off-by lines”
  1. git-commit: no silent exit on duplicate Signed-off-by linesLuben Tuikov, Aug 13, 2006
  2. Junio C HamanoAug 13, 2006
  3. Luben TuikovAug 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.