From: Thomas Rast <tr@thomasrast.ch>
To: Dario Bertini <berdario@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: diff weirdness (bug?)
Date: Mon, 17 Feb 2014 11:20:10 +0100 [thread overview]
Message-ID: <87r472ujl1.fsf@thomasrast.ch> (raw)
In-Reply-To: <53014A43.6080505@gmail.com> (Dario Bertini's message of "Mon, 17 Feb 2014 00:31:15 +0100")
Dario Bertini <berdario@gmail.com> writes:
> On 02/14/2014 09:03 PM, Junio C Hamano wrote:
>> This is a combined diff, and yaml-related lines are added relative
>> to your _other_ branch you are merging (notice these + are indented
>> by one place). Relative to what you had at the tip of your branch
>> before you started this operation that ended up conflicted, the
>> half-merged result removes if/else that sets DIST_MODULE_PATH and
>> replaces it with a single line (their +/- are on the first column,
>> signifying that these are differences relative to the first parent,
>> i.e. your state before you started the operation).
>>
>>> if we remove these 3 lines, we'll get this diff:
>>
>> With that understanding, I think the output after removing these
>> three lines is perfectlyh understandable and correct. You are
>> looking at the three lines that used to exist in the version you
>> started from, that were missing from the other side. If you remoe
>> them, it will show as removal from _your_ version (notice these -
>> that shows what _you_ did manually are on the first column, saying
>> that that is relative to _your_ version).
>>
>
> Thank you, I was completely unaware of combined diffs. Still: I can't
> see how this would explain the empty diff when deleting 4 lines instead
> of 3.
With a --cc diff (which it is: it says 'diff --cc' in the file headers)
git doesn't show the combined diff for hunks that fully agree with one
side.
So if you (even manually) resolve the merge so that it fully matches one
side, that will not show up in a --cc diff.
--
Thomas Rast
tr@thomasrast.ch
next prev parent reply other threads:[~2014-02-17 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 19:20 diff weirdness (bug?) Dario Bertini
2014-02-14 20:03 ` Junio C Hamano
2014-02-16 23:31 ` Dario Bertini
2014-02-17 10:20 ` Thomas Rast [this message]
2014-02-18 19:12 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r472ujl1.fsf@thomasrast.ch \
--to=tr@thomasrast.ch \
--cc=berdario@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).