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

Re: [PATCH v1] rebase -m: Use empty tree base for parentless commits

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 9, 2014, 20:18 UTC
Message-ID
<xmqqoatl574t.fsf@gitster.dls.corp.google.com>
In-Reply-To
<5436E83A.7070603@gmail.com>
Fabian Ruch <bafain@gmail.com> writes:
Show 6 quoted lines
>> The interface to "git-merge-$strategy" is designed in such a way
>> that each strategy should be capable of taking _no_ base at all.
>
> The merge strategies "resolve" and "octopus" seem to refuse to run if no
> base is specified. The former silently exits if no bases are given and
> the latter dies saying "Unable to find common commit".

That just means these two strategies are not prepared to do a merge without base (yet). It does not automatically give license to the caller to pass a random tree as if it is the merge base the user wanted to use.

For "resolve", I think it is OK for it to detect that the caller did not give a common ancestor tree and use an empty tree when merging (which is what merge-recursive ends up doing internally).

I am not offhand sure if the same is sensible for "octopus", though.
Previous: Fabian RuchNext: Fabian Ruch
Message 5 of 8 in “Apparent bug in git rebase with a merge commit”
  1. David M. LloydOct 7, 2014
  2. rebase -m: Use empty tree base for parentless commitsFabian Ruch, Oct 9, 2014
  3. Junio C HamanoOct 9, 2014
  4. Fabian RuchOct 9, 2014
  5. Junio C HamanoOct 9, 2014
  6. Fabian RuchOct 13, 2014
  7. Derek MooreOct 9, 2014
  8. David M. LloydOct 9, 2014

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.