Re: git-grep while excluding files in a blacklist
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jan 18, 2012, 01:24 UTC
- Message-ID
- <CACsJy8C0aXgecCWHrCK3yzNLWnWX4g81x-OzZCY0xtonbspzXw@mail.gmail.com>
- In-Reply-To
- <7v4nvurszj.fsf@alter.siamese.dyndns.org>
On Wed, Jan 18, 2012 at 3:09 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes: > >> On Tue, Jan 17, 2012 at 4:14 PM, Dov Grobgeld <dov.grobgeld@gmail.com> wrote: >>> Does git-grep allow searching for a pattern in all files *except* >>> files matching a pattern. E.g. in our project we have multiple DLL's >>> in git, but when searching I would like to exclude these for speed. Is >>> that possible with git-grep? >> >> Not from command line, no. You can put "*.dll" to .gitignore file then >> "git grep --exclude-standard". > > No rush, but is this something we would eventually want to handle with the > negative pathspec?
Definitely. But because I'm stuck at adding "seen" feature from match_pathspec_depth to tree_entry_interesting, that probably won't happen this year. Adding "--exclude=<pattern>" to git-grep is a more plausible option.
-- Duy