From: El_Hoy <eloyesp@gmail.com>
To: git@vger.kernel.org
Subject: Making git grep ignore binary the default
Date: Fri, 17 Oct 2025 12:00:27 -0300 [thread overview]
Message-ID: <CAPapNH0C3+bU-RUO6oFHUKLjKuNdm-aXgsFTHFobYVrJXWzr=g@mail.gmail.com> (raw)
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
next reply other threads:[~2025-10-17 15:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 15:00 El_Hoy [this message]
2025-10-17 21:29 ` Making git grep ignore binary the default 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPapNH0C3+bU-RUO6oFHUKLjKuNdm-aXgsFTHFobYVrJXWzr=g@mail.gmail.com' \
--to=eloyesp@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).