git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Making git grep ignore binary the default
@ 2025-10-17 15:00 El_Hoy
  2025-10-17 21:29 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: El_Hoy @ 2025-10-17 15:00 UTC (permalink / raw)
  To: git

I've found that there is a flag (`git grep -I`) to ignore binary
files, it works great, but I've found no way to make it the default.

It would be great to have a config for this. This way a possible
implementation implies:

- Adding a config `grep.ignoreBinary` that defaults to false, keeping
the current default.

- Adding a flag `git grep --include-binary` to revert the default. But
maybe the `-a, --text` flag already does that.

Also, maybe the next git version (3.0) can default to ignore-binary as
a better default.

Finally, if this makes sense, I can do my best to implement the change
in the code.

Regards.
- Eloy

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-10-21  7:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 15:00 Making git grep ignore binary the default El_Hoy
2025-10-17 21:29 ` Junio C Hamano
2025-10-17 23:29   ` Thomas Braun
2025-10-18  0:52     ` brian m. carlson
2025-10-18 14:16       ` rsbecker
2025-10-20 15:24       ` Thomas Braun
2025-10-20 17:20         ` El_Hoy
2025-10-21  7:27           ` Jeff King
2025-10-18 10:22   ` Jeff King
2025-10-18 16:01     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).