From: Junio C Hamano <gitster@pobox.com>
To: Eli Barzilay <eli@barzilay.org>
Cc: "René Scharfe" <l.s.r@web.de>, git <git@vger.kernel.org>
Subject: Re: git-diff bug?
Date: Mon, 02 Nov 2020 14:14:59 -0800 [thread overview]
Message-ID: <xmqqlffjs8ws.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CALO-gusRt4J5ar45mo7un-EENyt5cX2SQvcXgyMmaHNZg5bFUg@mail.gmail.com> (Eli Barzilay's message of "Mon, 2 Nov 2020 16:06:49 -0500")
Eli Barzilay <eli@barzilay.org> writes:
>> 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
ccc
In an extreme case, this diff is even valid.
@@ -1,4 +1,4 @@
-aaa
-bbb
-ccc
-
+aaa
+bbb
+
+ccc
It's just that it is not as _useful_ as other valid diff that
explains how the preimage changed to the postimage.
HTH.
next prev parent reply other threads:[~2020-11-02 22:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 6:53 git-diff bug? Eli Barzilay
2020-11-02 17:45 ` René Scharfe
2020-11-02 21:06 ` Eli Barzilay
2020-11-02 22:14 ` Junio C Hamano [this message]
2020-11-03 3:14 ` Eli Barzilay
2020-11-03 16:58 ` Junio C Hamano
2020-11-02 22:00 ` 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=xmqqlffjs8ws.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=eli@barzilay.org \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.