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
RMRalph Maalouf <ralph.maalouf@caretrx.com>
Date
Jul 29, 2019, 22:26 UTC
Message-ID
<MN2PR13MB2607F98BF473C36A0C8F17ECEADD0@MN2PR13MB2607.namprd13.prod.outlook.com>
In-Reply-To
<xmqqsgqotsyi.fsf@gitster-ct.c.googlers.com>
Ahh that clears it up for me. I incorrectly assumed that at minimum that each "<<<<<<HEAD" represented a hunk..
I searched for the definition of hunk in gitglossary but couldn't find it.

Thanks for the clarification! Ralph

-----Original Message-----
From: Junio C Hamano <gitster@pobox.com> 
Sent: Monday, July 29, 2019 5:46 PM
To: Ralph Maalouf <ralph.maalouf@caretrx.com>
Cc: 'git@vger.kernel.org' <git@vger.kernel.org>
Subject: Re: 'git show -c' omits hunk even though file was modified from all parents
Ralph Maalouf <ralph.maalouf@caretrx.com> writes:
Show 19 quoted lines
> "We do not show hunks that match one of the parents ". But in case
> 1 the second hunk matches one of the parents yet `git show -c` still 
> outputs it.
>
> diff --combined test1
> index 02ef2b0,ffc05f2..59d575d
> --- a/test1
> +++ b/test1
> @@@ -1,8 -1,8 +1,9 @@@
>   One
>  +Two
> + Four
>   Three
>
>
>   Seven
>  -Ten
>  +Eight
>   Nine
The above is a single hunk (whose definition is the group of lines delimited by @@@...@@@ lines).
Previous: Junio C Hamano
Message 5 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.