Re: [PATCH 2/2] grep --no-index: don't use git standard exclusions
- From
Bert Wesarg <bert.wesarg@googlemail.com>
- Date
- Sep 16, 2011, 18:23 UTC
- Message-ID
- <CAKPyHN2ewwLf6am3VQr_z4c3_Q5=saeLcZtuY-fEtUGr-41rKQ@mail.gmail.com>
- In-Reply-To
- <7vmxe5pp4n.fsf@alter.siamese.dyndns.org>
On Thu, Sep 15, 2011 at 21:44, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Bert Wesarg <bert.wesarg@googlemail.com> writes: > >> On Wed, Jul 20, 2011 at 22:57, Junio C Hamano <gitster@pobox.com> wrote: >>> - Since 3081623 (grep --no-index: allow use of "git grep" outside a git >>> repository, 2010-01-15) and 59332d1 (Resurrect "git grep --no-index", >>> 2010-02-06), "grep --no-index" incorrectly paid attention to the >>> exclude patterns. We shouldn't have, and we'd fix that bug. >> >> Fix this bug. > > On a busy list like this, it is brutal to withhold the better clues you > certainly had when you wrote this message that would help people to locate > the original message you are quoting, and instead forcing everybody to go > back 5000 messages in the archive to find it. E.g. > > http://article.gmane.org/gmane.comp.version-control.git/177548 > http://mid.gmane.org/7vzkk86577.fsf@alter.siamese.dyndns.org > > Or perhaps have > > References: <7vzkk86577.fsf@alter.siamese.dyndns.org> > > in the header.
Sorry for this patch with insufficient references and context. I realized it too late, and the time was short.
> > As to the patch, I think this addresses only one fourth of the issue > identified in that discussion (it is a good starting point, though). >
I thought to split the bug fixing from the new features. I already implemented --exclude-standard, including --exclude=<patter>, --exclude-from=<file> and --exclude-per-directory=<file>. But it's not ready because of missing tests and documentation. So I just spilled this bug fix patch out and will now work on the next part.
Show 5 quoted lines
> With this change, it would now make sense to teach --[no-]exclude-standard > to "git grep", and "--exclude-standard" is immediately useful when used > with "--no-index". When we add "git grep --untracked-too" (which lets us > search in the working tree), people can add "--no-exclude-standard" to the > command line to say "I want to find the needle even from an ignored file".
Would '--untracked-too' only be a synonym for '--no-index --exclude-standard', i.e. the current behavior?
Bert
> > Thanks. >