threads / discuss / 45423

How do I make 'git diff --no-index' follow symlinks?

Subject: How do I make 'git diff --no-index' follow symlinks?

## tl;dr

3 messages between Mar 18, 2017 and Mar 18, 2017.

replies: 2people: 3as markdown or json

Ævar Arnfjörð Bjarmason· Mar 18, 2017, 17:55 UTC · lore
I'd like to (ab)use git's nice diff interface and make this work:
    git --no-pager diff --no-index <(echo foo) <(echo bar)
It just prints:
    -pipe:[203030063]
    +pipe:[203030065]
But I want:
    $ diff -u0 <(echo foo) <(echo bar)|tail -n 2
    -foo
    +bar

I went diving through the diff code for a bit, but couldn't find where it's stat()-ing the two files and deciding it's not going to follow symlinks.

Just having some option to follow symlinks would make this work.
Junio C Hamano· Mar 18, 2017, 19:30 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: How do I make 'git diff --no-index' follow symlinks?

Sounds like
    https://public-inbox.org/git/20161111201958.2175-1-dennis@kaarsemaker.net/
to me.  A key message in the thread may be:
    https://public-inbox.org/git/alpine.DEB.2.20.1611121106110.3746@virtualbox/
Dennis Kaarsemaker· Mar 18, 2017, 22:54 UTC · re: Junio C Hamano · lore

Re: How do I make 'git diff --no-index' follow symlinks?

On Sat, 2017-03-18 at 12:30 -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Sounds like
> 
>     https://public-inbox.org/git/20161111201958.2175-1-dennis@kaarsemaker.net/
> 
> to me.  A key message in the thread may be:
> 
>     https://public-inbox.org/git/alpine.DEB.2.20.1611121106110.3746@virtualbox/

Sorry for the delay in sending v3. I've had a serious case of Lennonitis (Life is what happens to you while you're busy making other plans).

D.

← back to recent threads