git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Pang Yan Han <pangyanhan@gmail.com>,
	Thomas Rast <trast@student.ethz.ch>,
	Ramkumar Ramachandra <artagnon@gmail.com>,
	Bertrand BENOIT <projettwk@users.sourceforge.net>,
	git@vger.kernel.org
Subject: Re: git grep doesn't follow symbolic link
Date: Mon, 16 Jan 2012 14:44:40 -0800	[thread overview]
Message-ID: <7vwr8ruv1j.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACsJy8CaBAEJo_LuvjYhb2kfofH83cbR5DFDffmmCU3uJFqk+g@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Sun, 15 Jan 2012 16:47:31 +0700")

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> It's not wrong per se. It's an implication that users have to take
> when they choose to use it. We may help make it clear that the
> symlinks point to untracked files by putting some indication in the
> diff.
>
> When I do "git log -Sfoo -- '*.cxx'" I don't really care if bar.cxx is
> a symlink. Neither does my compiler. It may be a symlink's target
> change that makes "foo" appear. Git could help me detect that quickly
> instead of sticking with tracked contents only.

As there is nothing in Git that tells that whatever is pointed at by
bar.cxx that happens to be in your filesystem today had "foo" in it when
that historical version of the commit whose bar.cxx symlink was updated to
point to that file. It is *WRONG* to show the commit as something that
changes bar.cxx to contain "foo" (or more precisely, changes the count of
"foo" in it).

Why is it so hard to understand?

  reply	other threads:[~2012-01-16 22:44 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
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 [this message]
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=7vwr8ruv1j.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pangyanhan@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=projettwk@users.sourceforge.net \
    --cc=trast@student.ethz.ch \
    /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).