Re: [PATCH v3] log -G: ignore binary files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 26, 2018, 23:24 UTC
- Message-ID
- <xmqqlg49mmus.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <f7cb34c6268f556772fa4ee374e2541ba518e2b8.1544811828.git.thomas.braun@virtuell-zuhause.de>
Thomas Braun <thomas.braun@virtuell-zuhause.de> writes:
Show 11 quoted lines
> - The internally used algorithm for generating patch text is based on > xdiff and its states in [1] > > > The output format of the binary patch file is proprietary > > (and binary) and it is basically a collection of copy and insert > > commands [..] > > which means that the current format could change once the internal > algorithm is changed as the format is not standardized. In addition > the git binary patch format used for preparing patches for git apply > is *different* from the xdiff format as can be seen by comparing
This particular argument sounds like a red herring. After all, when the --text option is given
Show 18 quoted lines
> > git log -p -a > > commit 6e95bf4bafccf14650d02ab57f3affe669be10cf > Author: A U Thor <author@example.com> > Date: Thu Apr 7 15:14:13 2005 -0700 > > modify binary file > > diff --git a/data.bin b/data.bin > index f414c84..edfeb6f 100644 > --- a/data.bin > +++ b/data.bin > @@ -1,2 +1,4 @@ > a > a^@a > +a > +a^@a
we will see 'a' in the output no matter how xdiff internally works; there is no way to express the above change textually without showing "+a" somewhere in the patch output.
The rest of the log message looks good, and ...
Show 7 quoted lines
> Changes since v2: > - Introduce a setup step for the new tests > - Really start with a clean history in the tests > - Added more complex commit history for the tests > - Use test_when_finished for cleanup instead of doing nothing > - Enhanced commit message to motivate the change better > - Added some more documentation
... the tests are certainly a lot easier to follow.
Thanks.