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

Re: Our merge bases sometimes suck

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2014, 22:35 UTC
Message-ID
<xmqqbntw1lqx.fsf@gitster.dls.corp.google.com>
In-Reply-To
<539B1E59.1030604@gmail.com>
Jakub Narębski <jnareb@gmail.com> writes:
Show 14 quoted lines
> I don't know if it has been fixed, but there is a difference
> between "git diff A...B" when A and B have one merge base, and
> "git diff A...B" when there are more than one merge base.
>
> When there is one merge base, "git diff A...B" returns simple
> unified diff equivalent to "git diff $(git merge-base A B) B".
> It is unsymmetric.
>
> But where there are more than one merge base, by design or by
> accident for "git diff A...B" git 1.9.2 / 1.7.4 returns
>
>    git diff --cc $(git merge-base --all A B) A B
>
> which is *symmetric*, and is combined not unified diff.

Hmph, the relevant code has not changed very much since c008c0ff (diff A...B: give one possible diff when there are more than one merge-base, 2010-07-12) which has been with us since v1.7.2.

Previous: Michael HaggertyNext: Junio C Hamano
Message 6 of 12 in “Our merge bases sometimes suck”
  1. Michael HaggertyJun 12, 2014
  2. Michael J GruberJun 13, 2014
  3. Michael HaggertyJun 13, 2014
  4. Jakub NarębskiJun 13, 2014
  5. Michael HaggertyJun 13, 2014
  6. Junio C HamanoJun 13, 2014
  7. Junio C HamanoJun 17, 2014
  8. Michael HaggertyJun 17, 2014
  9. Junio C HamanoJun 20, 2014
  10. Michael HaggertyJun 20, 2014
  11. Nico WilliamsJun 20, 2014
  12. Jakub NarębskiJun 23, 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.