Thread (1 message) 1 message, 1 author, 2016-11-16

Re: [RFC/PATCH 0/2] git diff <(command1) <(command2)

From: Junio C Hamano <hidden>
Date: 2016-11-16 18:37:20

Junio C Hamano [off-list ref] writes:
Johannes Schindelin [off-list ref] writes:
quoted
On Mon, 14 Nov 2016, Junio C Hamano wrote:
quoted
I _think_ the no-index mode was primarily for those who want to use
our diff as a replacement for GNU and other diffs, and from that
point of view, I'd favour not doing the "comparing symbolic link?
We'll show the difference between the link contents, not target"
under no-index mode myself.
If I read this correctly,...
Now I re-read it and I can see it can be read either way.

By "link contents" in "comparing symbolic link? We'll show the
difference between the link contents, not target", I meant the
result you get from readlink(2), which will result in

    diff --git a/RelNotes b/RelNotes
    index c02235fe8c..b54330f7cd 120000
    --- a/RelNotes
    +++ b/RelNotes
    @@ -1 +1 @@
    -Documentation/RelNotes/2.10.2.txt
    \ No newline at end of file
    +Documentation/RelNotes/2.11.0.txt
    \ No newline at end of file

not the comparison between the files that are link targets,
i.e. hypothetical

    diff --git a/RelNotes b/RelNotes
    index c4d4397023..7a1fce7720 100644
    --- a/Documentation/RelNotes/2.10.2.txt
    +++ b/Documentation/RelNotes/2.11.0.txt
    @@ -1,41 +1,402 @@
    -Git v2.10.2 Release Notes
    -=========================
    +Git 2.11 Release Notes
    ...

And I'd favour *NOT* doing that if we are using our diff as a
Again, this can be read both ways.  By "that" on the above line I
meant "the former".
replacement for GNU and other diffs in "no-index" mode.  Which leads
to ...
quoted
quoted
That is a lot closer to the diff other people implemented, not ours.
Hence the knee-jerk reaction I gave in

http://public-inbox.org/git/xmqqinrt1zcx.fsf@gitster.mtv.corp.google.com
... this conclusion, which is consistent with ...
quoted
Let me quote the knee-jerk reaction:
quoted
My knee-jerk reaction is:

 * The --no-index mode should default to your --follow-symlinks
   behaviour, without any option to turn it on or off.
... this one.

But notice "I _think_" in the first sentence you quoted.  That is a
basic assumption that leads to the conclusion, and that assumption
is not a fact.  Maybe users do *not* want the "no-index" mode as a
replacement for GNU and other diffs, in which case comparing the
result of readlink(2) even in no-index mode might have merit.  I
just didn't think it was the case.
And "I just didn't think it was the case", when fully spelt out, is
"I just didn't think that the assumption was incorrect."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help