Subject: Re: feature request: excluding files/paths from "git grep"

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Mar 2015 12:56:10 -0800

Noel Grandin <[email-masked]> writes:

> On 2015-03-02 02:50 PM, Trevor Saunders wrote:
>> I think they solve somewhat different problems, but maybe my problem
>> is so specialized I should just have a wrapper around grep that
>> changes defaults. Trev 
>
> I'm with Trevor on this one. While I see the appeal of the generality
> of a macro solution, this is really just about convenience for me on a
> per-project basis.
>
> As in, while working on a specific project, I sometimes just want to
> exclude, for the time being, a bunch of stuff from 'git grep'.

The key word here is "for the time being", though.  What would you
do once you are done with the "for the time being" activity?  "git
config --unset"?

If you forget to do so when the "for the time being" activity ends,
and then you try to run 'git grep' and see that you did not get
expected hits from hierarchies that you set to exclude earlier, you
either (1) get misled to a wrong decison based on that false
non-hit, or (2) start scratching your head, wasting time trying to
figure out why 'git grep' is not hitting, no?

I expect the answer might be "No, I won't forget; I am very well
organized and you do not have to worry for me".  But a feature is an
invitation for people other than yourself, so...