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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Wed, Mar 04, 2015 at 12:56:10PM -0800, Junio C Hamano wrote:
>
>> > 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"?
>
> IMHO this is being too paternalistic. You can already shoot yourself
> in the foot by configuring an alias to grep, running your alias, and
> wondering why it does not produce the results you wanted.

Yeah, as I said, it is a deliberately paternalistic stance.  But at
least when I say "git mygrep" using the alias mechanism and get a
result that is different from what I expect from "git grep", I would
know I am doing something different with "mygrep" from "grep", no?

And a great thing about that "use alias" approach is that we can
sidestep the entire "then what should I do when I have to override
the configured thing for one-shot invocation?" question, as there is
an obvious simple answer "don't use that alias but use the
underlying command".
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]