git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: How do I make 'git diff --no-index' follow symlinks?
Date: Sat, 18 Mar 2017 18:55:27 +0100
Message-ID: <CACBZZX6Bknimu26in8YG7TbsL3hEpmXTYwQAZQ5xK-DFoSatEg@mail.gmail.com> (raw)

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.

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 17:55 Ævar Arnfjörð Bjarmason [this message]
2017-03-18 19:30 ` Junio C Hamano
2017-03-18 22:54   ` Dennis Kaarsemaker

Reply instructions:

You may reply publically 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACBZZX6Bknimu26in8YG7TbsL3hEpmXTYwQAZQ5xK-DFoSatEg@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox