From: Thomas Braun <thomas.braun@virtuell-zuhause.de>
To: GIT Mailing-list <git@vger.kernel.org>
Subject: log -S/-G (aka pickaxe) searches binary files by default
Date: Fri, 3 Mar 2017 01:52:52 +0100 [thread overview]
Message-ID: <7a0992eb-adb9-a7a1-cfaa-3384bc4d3e5c@virtuell-zuhause.de> (raw)
Hi,
I happen to have quite large binary files in my repos.
Today I realized that a line like
git log -G a
searches also files found to be binary (or explicitly marked as binary).
Is that on purpose?
The documentation of "-G<regex>" states
"Look for differences whose patch text contains added/removed lines that
match <regex>."
which contradicts the current behaviour. At least for me text != binary.
To reproduce:
$ git init
$ echo -e "a\0b" > data.bin
$ git add data.bin
$ git commit -m "Add new data"
$ git log -p
[...]
diff --git a/data.bin b/data.bin
new file mode 100644
index 0000000..1a23e4b
Binary files /dev/null and b/data.bin differ
$ git log -G a
[...]
Add new data
I've verified the behaviour with git version 2.12.0.windows.1 and git
version 2.12.0.189.g3bc5322 on debian.
If it is on purpose is there a config option to disable that?
Thanks for reading,
Thomas
next reply other threads:[~2017-03-03 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 0:52 Thomas Braun [this message]
2017-03-03 1:36 ` log -S/-G (aka pickaxe) searches binary files by default Junio C Hamano
2017-03-03 5:17 ` Jeff King
2017-03-03 16:07 ` Junio C Hamano
2017-03-03 18:05 ` Thomas Braun
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=7a0992eb-adb9-a7a1-cfaa-3384bc4d3e5c@virtuell-zuhause.de \
--to=thomas.braun@virtuell-zuhause.de \
--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).