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

Re: Possible bug in Git

From
Avery Pennarun <apenwarr@gmail.com>
Date
Apr 16, 2010, 00:06 UTC
Message-ID
<o2m32541b131004151706hb48a0d04yf7fa4238d423a4e3@mail.gmail.com>
In-Reply-To
<7vr5mggt9a.fsf@alter.siamese.dyndns.org>
On Thu, Apr 15, 2010 at 8:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Avery Pennarun <apenwarr@gmail.com> writes:
>
>> So what git tries to do is reduce the diff output of a merge commit
>> down to just the "unexpected" parts: the parts that are different from
>> what you'd get if you just merged in the individual changes in the
>> obvious way.
>
> This (and everything you said after this paragraph) is not quite correct.
> What is shown is the pieces that do not match either of the parent.
>
> So if you have a conflicted merge and resolve it by taking what one side
> did literally (think: "merge -X ours"), that hunk becomes uninteresting
> because the end result matches what one of the parents had.
Hmm, but David also said:
>>> git show commit:path shows empty file:
>>> $ git show dac6a95f5:facturacion/facturacion/scripts/lineasfacturascli.qs | wc
>>>     0       0       0

The output seems to match neither parent in any way, and yet the simplification has resulted in no diff at all. Strange, no?

Avery
Previous: Junio C HamanoNext: Avery Pennarun
Message 5 of 12 in “Possible bug in Git”
  1. David Martínez MartíApr 15, 2010
  2. combined diff: correctly handle truncated fileThomas Rast, Apr 15, 2010
  3. Avery PennarunApr 15, 2010
  4. Junio C HamanoApr 16, 2010
  5. Avery PennarunApr 16, 2010
  6. Avery PennarunApr 16, 2010
  7. Jay SoffianApr 16, 2010
  8. Avery PennarunApr 16, 2010
  9. Linus TorvaldsApr 16, 2010
  10. Thomas RastApr 16, 2010
  11. Junio C HamanoApr 16, 2010
  12. Thomas RastApr 16, 2010

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.