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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steven Grimm <koreth@...>
Cc: <git@...>
Date: Monday, July 23, 2007 - 7:58 am

Hi,

On Mon, 23 Jul 2007, Steven Grimm wrote:


Yes, I think that makes sense.


Okay, but I was really confused by the big if thing.

I'd make sure that COMMIT_BAREMSG is removed with a trap, and really try 
to just enhance the

	if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG |
	        git stripspace |
	        wc -l` &&
	   test 0 -lt $cnt

so that it reads something like

	if test -s "$GIT_DIR"/COMMIT_BAREMSG &&
		test -z "$templatefile" ||
		(grep -ve '^#' < "$templatefile" |
		 git stripspace |
		 git diff --quiet - "$GIT_DIR"/COMMIT_BAREMSG)
	then
		...

(Totally untested, of course.) Hmm?

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Teach git-commit about commit message templates., Steven Grimm, (Mon Jul 23, 12:17 am)
Re: [PATCH] Teach git-commit about commit message templates., Johannes Schindelin, (Mon Jul 23, 6:04 am)
Re: [PATCH] Teach git-commit about commit message templates., Johannes Schindelin, (Mon Jul 23, 6:40 am)
Re: [PATCH] Teach git-commit about commit message templates., Johannes Schindelin, (Mon Jul 23, 7:58 am)