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

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

 



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.

But I'd also oppose a `grep.pathspecs` config option for a similar
reason: you can already accomplish the same thing (and more) with an
alias.

-Peff

PS One annoying thing about aliases is that you cannot re-alias an
   existing command, and git has already taken all of the good, easy
   names that we have trained our fingers for. :)

   Of course re-aliasing git-grep is another recipe for head-scratching
   (and broken scripts), but I am not sure there aren't a host of other
   ways to do a similar thing (basically any configuration option has
   the capacity to produce unexpected results if you forget that it is
   set).

   I dunno. Probably I am a bad person for dredging up that ancient
   argument again.
--
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]