git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* log -S/-G (aka pickaxe) searches binary files by default
@ 2017-03-03  0:52 Thomas Braun
  2017-03-03  1:36 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Braun @ 2017-03-03  0:52 UTC (permalink / raw)
  To: GIT Mailing-list

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

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

end of thread, other threads:[~2017-03-03 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03  0:52 log -S/-G (aka pickaxe) searches binary files by default Thomas Braun
2017-03-03  1:36 ` 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

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).