Re: [PATCH v1 1/2] log -G: Ignore binary files
- From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
- Date
- Nov 28, 2018, 11:31 UTC
- Message-ID
- <992623969.1654.1543404690644@ox.hosteurope.de>
- In-Reply-To
- <xmqq4lc3uyuh.fsf@gitster-ct.c.googlers.com>
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> hat am 27. November 2018 um 01:51 geschrieben: > > > Stefan Beller <sbeller@google.com> writes: > > > On Wed, Nov 21, 2018 at 1:08 PM Thomas Braun > > <thomas.braun@virtuell-zuhause.de> wrote: > >> > >> The -G <regex> option of log looks for the differences whose patch text > >> contains added/removed lines that match regex. > >> > >> The concept of differences only makes sense for text files, therefore > >> we need to ignore binary files when searching with -G <regex> as well. > > > > What about partial text/partial binary files? > > Good point. You'd use "-a" (or "--text") to tell the diff machinery > to treat the contents as text, and the new logic must pay attention > to that command line option.
Yes exactly. Either use -a for the occasional use or a textconv filter for permanent use.
Coming from the opposite side: I usually mark svg files as binary as the textual diff is well, let's say uninspiring.