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

[PATCH] git-commit: Having $GIT_COMMITTER_NAME implies -s

From
Andreas Ericsson <exon@op5.se>
Date
Nov 16, 2005, 23:38 UTC
Message-ID
<20051116233829.0B3C55BA81@nox.op5.se>

I've been trying, in vain, to tell my colleagues to use the -s flag. With this patch I can at least fix up their .profile's myself.

Signed-off-by: Andreas Ericsson <ae@op5.se>
---
 git-commit.sh |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

applies-to: a2fe76123d6f5b835d3312a70a02ed4d07e25f8e d32c78570e25a9718721937b1ee9051e950ad1fd

diff --git a/git-commit.sh b/git-commit.sh
index 41955e8..ff9502c 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -134,8 +134,7 @@ then
 	cat "$GIT_DIR/MERGE_MSG"
 fi | git-stripspace >"$GIT_DIR"/COMMIT_EDITMSG
 
-case "$signoff" in
-t)
+if [ "$signoff" = t -o "$GIT_COMMITTER_NAME" ]; then
 	{
 		echo
 		git-var GIT_COMMITTER_IDENT | sed -e '
@@ -143,8 +142,7 @@ t)
 			s/^/Signed-off-by: /
 		'
 	} >>"$GIT_DIR"/COMMIT_EDITMSG
-	;;
-esac
+fi
 
 if [ -f "$GIT_DIR/MERGE_HEAD" ]; then
 	echo "#"
---
0.99.9.GIT
Next: Junio C Hamano
Message 1 of 3 in “git-commit: Having $GIT_COMMITTER_NAME implies -s”
  1. git-commit: Having $GIT_COMMITTER_NAME implies -sAndreas Ericsson, Nov 16, 2005
  2. Junio C HamanoNov 17, 2005
  3. H. Peter AnvinNov 17, 2005

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.