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

Re: [PATCH] fmt-merge-msg: detached HEAD

From
Junio C Hamano <junkio@cox.net>
Date
Jan 26, 2007, 00:16 UTC
Message-ID
<7vireu63rg.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<87zm875d9u.fsf@gmail.com>
Santi Béjar <sbejar@gmail.com> writes:
Show 21 quoted lines
> 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);
Hmph.
The reason is?
Previous: Santi BéjarNext: Santi Béjar
Message 2 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.