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

[PATCH] fmt-merge-msg: detached HEAD

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jan 25, 2007, 15:36 UTC
Message-ID
<87zm875d9u.fsf@gmail.com>
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
Next: Junio C Hamano
Message 1 of 6 in “fmt-merge-msg: detached HEAD”
  1. fmt-merge-msg: detached HEADSanti Béjar, Jan 25, 2007
  2. Junio C HamanoJan 26, 2007
  3. Santi BéjarJan 26, 2007
  4. Junio C HamanoJan 26, 2007
  5. Santi BéjarJan 26, 2007
  6. Junio C HamanoJan 26, 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.