git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] grep --no-index: don't use git standard exclusions

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2011, 19:44 UTC
Message-ID
<7vmxe5pp4n.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7b3551dd84a2bfec78c8db1d14dd2d0e6dda35f6.1316110876.git.bert.wesarg@googlemail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
Show 7 quoted lines
> 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.

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).

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".

Thanks.
Previous: Bert WesargNext: Bert Wesarg
Message 3 of 8 in “grep: do not use --index in the short usage output”
  1. 1/2 grep: do not use --index in the short usage outputBert Wesarg, Sep 15, 2011
  2. 2/2 grep --no-index: don't use git standard exclusionsBert Wesarg, Sep 15, 2011
  3. Junio C HamanoSep 15, 2011
  4. Bert WesargSep 16, 2011
  5. Re* [PATCH 2/2] grep --no-index: don't use git standard exclusionsJunio C Hamano, Sep 27, 2011
  6. 2/2 grep: --untracked and --exclude testsJunio C Hamano, Sep 27, 2011
  7. Bert WesargSep 28, 2011
  8. Junio C HamanoSep 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.