Re: git-diff bug?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 2, 2020, 22:14 UTC
- Message-ID
- <xmqqlffjs8ws.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CALO-gusRt4J5ar45mo7un-EENyt5cX2SQvcXgyMmaHNZg5bFUg@mail.gmail.com>
Eli Barzilay <eli@barzilay.org> writes:
Show 5 quoted lines
>> This matches your results. That the order makes a difference is a bit >> odd. Both are valid diffs of the inputs and neither one changes blank >> lines, though, so it doesn't look like a bug. > > How is it valid?
Just this part. Any patch output that correctly explains how the preimage text changed to the postimage text is a "valid" diff, and that is how René used the word. There are multiple "valid" diff to bring the preimage to the postimage:
(preimage) (postimage)
aaa aaa
bbb bbb
ccc
cccIn an extreme case, this diff is even valid.
@@ -1,4 +1,4 @@
-aaa
-bbb
-ccc
-
+aaa
+bbb
+
+cccIt's just that it is not as _useful_ as other valid diff that explains how the preimage changed to the postimage.
HTH.