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

Re: 'git show -c' omits hunk even though file was modified from all parents

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2019, 18:58 UTC
Message-ID
<xmqqd0hsvfb9.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<MN2PR13MB2607878CB0C1E351B83F006BEADD0@MN2PR13MB2607.namprd13.prod.outlook.com>

So in short, one side has 1/2/3//7/10/9 in fileA and the other side has 1/4/3//7/10/9, and the result of the merge is recorded as 1/2/3//7/10/9.

> I realize that this is because fileA in the merge commit's tree is
> identical to what it was in branchA prior to the merge (so the
> output of 'git show -m' only outputs the diff for one parent). But
> I'm wondering if this is the intended behavior.

Yes, that is very much intended. We do not show hunks that match one of the parents, and if there is no hunk to show, the path itself is not shown.

Previous: Ralph MaaloufNext: Ralph Maalouf
Message 2 of 5 in “'git show -c' omits hunk even though file was modified from all parents”
  1. Ralph MaaloufJul 29, 2019
  2. Junio C HamanoJul 29, 2019
  3. Ralph MaaloufJul 29, 2019
  4. Junio C HamanoJul 29, 2019
  5. Ralph MaaloufJul 29, 2019

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.