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

Re: Making git grep ignore binary the default

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2025, 16:01 UTC
Message-ID
<xmqq347gw65j.fsf@gitster.g>
In-Reply-To
<20251018102209.GH1060824@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> I think we've discussed this before, and digging in the archive found
> this thread from 2012:
>
>   https://lore.kernel.org/git/4f1d2a8b.a2d8320a.50ec.576d@mx.google.com/
>
> I think some of those ideas came to fruition. You can do:
>
>   git grep ':(attr:!binary)'
>
> now (which obviously is harder than "-I", but the point is that it
> extends to any attribute if you want). But I still think it would be
> nice if there was a way to make it the default (without using an alias).

Yeah, after I re-read the thread, I specially liked the "filetype" idea that you floated in

  https://lore.kernel.org/git/20120125214625.GA4666@sigill.intra.peff.net/
;-).
Previous: Jeff King
Message 10 of 10 in “Making git grep ignore binary the default”
  1. El_HoyOct 17, 2025
  2. Junio C HamanoOct 17, 2025
  3. Thomas BraunOct 17, 2025
  4. brian m. carlsonOct 18, 2025
  5. rsbecker@nexbridge.comOct 18, 2025
  6. Thomas BraunOct 20, 2025
  7. El_HoyOct 20, 2025
  8. Jeff KingOct 21, 2025
  9. Jeff KingOct 18, 2025
  10. Junio C HamanoOct 18, 2025

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.