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

Re: [PATCH] Teach git-commit about commit message templates.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 23, 2007, 10:04 UTC
Message-ID
<Pine.LNX.4.64.0707231059490.14781@racer.site>
In-Reply-To
<20070723041741.GA22461@midwinter.com>
Hi,
On Sun, 22 Jul 2007, Steven Grimm wrote:
Show 12 quoted lines
> @@ -572,10 +591,35 @@ else
>  fi |
>  git stripspace >"$GIT_DIR"/COMMIT_MSG
>  
> -if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG |
> -	git stripspace |
> -	wc -l` &&
> -   test 0 -lt $cnt
> +# Test whether the commit message has any content we didn't supply.
> +have_commitmsg=
> +grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG |
> +	git stripspace > "$GIT_DIR"/COMMIT_BAREMSG
Up until here, I was with you.  But this feels very wrong.
Why not compare COMMIT_MSG to the templatefile, if there is one?  I.e.
test ! -z "$templatefile" && cmp "$GIT_DIR"/COMMIT_MSG "$templatefile" &&
	die "Unchanged message; will not commit"
Hmm?

Ciao, Dscho

Previous: Steven GrimmNext: Steven Grimm
Message 2 of 11 in “Teach git-commit about commit message templates.”
  1. Teach git-commit about commit message templates.Steven Grimm, Jul 23, 2007
  2. Johannes SchindelinJul 23, 2007
  3. Steven GrimmJul 23, 2007
  4. Johannes SchindelinJul 23, 2007
  5. Steven GrimmJul 23, 2007
  6. Johannes SchindelinJul 23, 2007
  7. Junio C HamanoJul 23, 2007
  8. Steven GrimmJul 24, 2007
  9. Junio C HamanoJul 24, 2007
  10. Steven GrimmJul 25, 2007
  11. Junio C HamanoJul 25, 2007

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.