Re: [PATCH v3] log -G: ignore binary files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Braun <thomas.braun@xxxxxxxxxxxxxxxxxxx> writes:

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

>
>   git log -p -a
>
>     commit 6e95bf4bafccf14650d02ab57f3affe669be10cf
>     Author: A U Thor <author@xxxxxxxxxxx>
>     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 ...

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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux