git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Bertrand BENOIT <projettwk@users.sourceforge.net>, <git@vger.kernel.org>
Subject: Re: git grep doesn't follow symbolic link
Date: Tue, 10 Jan 2012 11:00:34 +0100	[thread overview]
Message-ID: <877h0zlvwd.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <CALkWK0=-LZH4MYhX50v-RWpGA2r+6q50YxsKaOxc0mJ__yuK7g@mail.gmail.com> (Ramkumar Ramachandra's message of "Tue, 10 Jan 2012 11:26:36 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

> Hi Bertrand,
>
> Bertrand BENOIT wrote:
>> When using git grep, symbolic links are not followed.
>> Is it a wanted behavior ?
>
> I'd imagine so: symbolic links are not portable across different file
> systems; Git's internal representation of a symbolic link is a file
> containing the path of the file to be linked to.

I'd actually welcome a fix to this general area, for an entirely
different reason.  With bash and ordinary diff I can do things like

  diff -u <(ls) <(cd elsewhere && ls) | less

But I lose all the cute features of git-diff.  I *could* say

  git diff --no-index <(ls) <(cd elsewhere && ls)

and it helpfully tells me

  diff --git 1/dev/fd/63 2/dev/fd/62
  index 55ccbe5..d796c45 120000
  --- 1/dev/fd/63
  +++ 2/dev/fd/62
  @@ -1 +1 @@
  -pipe:[607341]
  \ No newline at end of file
  +pipe:[607343]
  \ No newline at end of file

Of course that's diff and not grep, but I think they suffer from the
same flaw: they share the file-kind handling logic of the rest of git in
a case where it's not very helpful.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2012-01-10 10:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 16:54 git grep doesn't follow symbolic link Bertrand BENOIT
2012-01-10  5:56 ` Ramkumar Ramachandra
2012-01-10 10:00   ` Thomas Rast [this message]
2012-01-10 18:22     ` Junio C Hamano
2012-01-14  9:50       ` Nguyen Thai Ngoc Duy
2012-01-15  2:07         ` Junio C Hamano
2012-01-15  9:47           ` Nguyen Thai Ngoc Duy
2012-01-16 22:44             ` Junio C Hamano
2012-01-17  1:55               ` Nguyen Thai Ngoc Duy
2012-01-17  6:44                 ` 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=877h0zlvwd.fsf@thomas.inf.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=projettwk@users.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).