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

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

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 27, 2015, 15:13 UTC
Message-ID
<54F08989.2050504@drmicha.warpmail.net>
In-Reply-To
<xmqqr3tcl78o.fsf@gitster.dls.corp.google.com>
Junio C Hamano venit, vidit, dixit 26.02.2015 21:59:
Show 12 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> So, as a summary of the discussion, it seems it's time to switch the
>> default to --textconv for git grep?
> 
> Hmmm, why?
> 
> Nobody seems to be asking for such a change in this thread.  The
> original issue IIRC was that the grep output was unnecessary for
> some paths and the repository did not mark these paths as such.
> Once they are marked as "-diff", there is no reason why you want to
> trigger textconv to squelch the hits from grep.

Of course not. All that I want, and that I wanted back then, was to have diff and grep behave the same.

> So that does not sound to me a summary of the discussion at all.
> 
Well, your conditional
Show 8 quoted lines
> I do not recall its conclusion, but it it were "Yes, that is what it
> means", then it might be reasonable to:
> 
>  - have "git grep" ignore paths marked with -diff by default
>    (perhaps "-a" option to disable, just like GNU)
> 
>  - have "git grep" pay attention to diff.textconv and search in the
>    result of textconv filter.

and Jeff's "Yes" on that condition certainly read like that to me: Make "git grep" react to "diff", "-diff" attributes in the same way as "git diff".

But I've set up my alias greppp since then and don't care any more, and I won't invest anything in this topic any more.

Michael
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 21 in “feature request: excluding files/paths from "git grep"”
  1. Noel GrandinFeb 25, 2015
  2. Duy NguyenFeb 25, 2015
  3. Jeff KingFeb 25, 2015
  4. Junio C HamanoFeb 25, 2015
  5. Jeff KingFeb 25, 2015
  6. Junio C HamanoFeb 25, 2015
  7. Jeff KingFeb 25, 2015
  8. Michael J GruberFeb 26, 2015
  9. Duy NguyenFeb 26, 2015
  10. Junio C HamanoFeb 26, 2015
  11. Michael J GruberFeb 27, 2015
  12. Junio C HamanoFeb 27, 2015
  13. Trevor SaundersFeb 27, 2015
  14. Junio C HamanoMar 1, 2015
  15. Trevor SaundersMar 1, 2015
  16. Junio C HamanoMar 1, 2015
  17. Trevor SaundersMar 2, 2015
  18. Noel GrandinMar 4, 2015
  19. Junio C HamanoMar 4, 2015
  20. Jeff KingMar 5, 2015
  21. Junio C HamanoMar 5, 2015

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.