[PATCH] fmt-merge-msg: detached HEAD

Previous thread: git merge FETCH_HEAD produced bad commit message by Michael S. Tsirkin on Thursday, January 25, 2007 - 7:52 am. (5 messages)

Next thread: How to change merge message ("weenie commits") by Bill Lear on Thursday, January 25, 2007 - 8:56 am. (7 messages)
From: sbejar
Date: Thursday, January 25, 2007 - 8:36 am

Do not say 'Merge ... into HEAD' when detached.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
---
 builtin-fmt-merge-msg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c
index 87d3d63..8cef425 100644
--- a/builtin-fmt-merge-msg.c
+++ b/builtin-fmt-merge-msg.c
@@ -331,7 +331,8 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
 			printf(" of %s", srcs.list[i]);
 	}
 
-	if (!strcmp("master", current_branch))
+	if (!strcmp("master", current_branch) ||
+	    !strcmp("HEAD", current_branch))
 		putchar('\n');
 	else
 		printf(" into %s\n", current_branch);
-- 
1.5.0.rc2.g2fa185-dirty

-

From: Junio C Hamano
Date: Thursday, January 25, 2007 - 5:16 pm

Santi B
From: sbejar
Date: Friday, January 26, 2007 - 2:45 am

On 1/26/07, Junio C Hamano <junkio@cox.net> wrote:
> Santi B
From: Junio C Hamano
Date: Friday, January 26, 2007 - 2:59 am

"Santi B
From: sbejar
Date: Friday, January 26, 2007 - 3:15 am

On 1/26/07, Junio C Hamano <junkio@cox.net> wrote:
> "Santi B
Previous thread: git merge FETCH_HEAD produced bad commit message by Michael S. Tsirkin on Thursday, January 25, 2007 - 7:52 am. (5 messages)

Next thread: How to change merge message ("weenie commits") by Bill Lear on Thursday, January 25, 2007 - 8:56 am. (7 messages)