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

Re: [PATCH] merge: allow to pretend a merge into detached HEAD is made into a branch

From
Sergey Organov <sorganov@gmail.com>
Date
Dec 18, 2021, 08:24 UTC
Message-ID
<87a6gyiamm.fsf@osv.gnss.ru>
In-Reply-To
<xmqqbl1ezq5j.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
[...]
Show 5 quoted lines
> Teach the "--detached-head-name=<branch>" option to "git merge" and
> its underlying "git fmt-merge-message", to pretend as if we were
> merging into <branch> (instead of HEAD) when they prepare the merge
> message.  The pretend name honors the usual "into <target>"
> suppression mechanism, which can be seen in the tests added here.

I think renaming destination branch in the commit message is useful in general, and should not be limited to merging to detached head. Please consider to introduce something like "--into-name=<name>" instead, that will do this renaming unconditionally.

Also, being an advocate for eventual abandoning of "detached head" from Git terminology, I'd prefer to see more neutral name for the option anyway.

Thanks, -- Sergey Organov

Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 8 in “merge: allow to pretend a merge into detached HEAD is made into a branch”
  1. merge: allow to pretend a merge into detached HEAD is made into a branchJunio C Hamano, Dec 18, 2021
  2. Sergey OrganovDec 18, 2021
  3. Junio C HamanoDec 20, 2021
  4. merge: allow to pretend a merge is made into a different branchJunio C Hamano, Dec 20, 2021
  5. Derrick StoleeDec 21, 2021
  6. Ævar Arnfjörð BjarmasonDec 18, 2021
  7. Derrick StoleeDec 20, 2021
  8. Junio C HamanoDec 20, 2021

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.