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

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

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jan 26, 2007, 09:45 UTC
Message-ID
<8aa486160701260145i4c50d564n90967a07f7ee62a9@mail.gmail.com>
In-Reply-To
<7vireu63rg.fsf@assigned-by-dhcp.cox.net>
On 1/26/07, Junio C Hamano <junkio@cox.net> wrote:
Show 27 quoted lines
> Santi Béjar <sbejar@gmail.com> writes:
>
> > 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?

For me, 'Merge ... into master' and 'Merge ... into HEAD' are equally useful, so do not show them by default. And git always merges into HEAD.

Santi
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.