Re: textconv not invoked when viewing merge commit

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> Jeff King <peff@xxxxxxxx> writes:
>>
>>> We just dump the binary goo all over the terminal. So I think the whole
>>> combined-diff code path needs to learn how to handle binaries properly.
>>
>> How would you show multi-way diffs for binary files?
>>
>> It would probably be sufficient to say "binary files differ" at the
>> beginning of the patch-combining codepath of the combined diff, which
>> would at least keep the --raw -c/--cc output working.
>
> In other words, I suspect that the only places you need to touch in the
> existing codepath would be these places.


In the "here are the places" patch, I changed combine_diff() to return "is
this binary?" and made show_patch_diff() to give just a single "path is
binary", but I suspect that it would be simpler not try to be too nice
about binary like that.

Instead, I think we should just use "Binary blob $SHA-1\n" as if that is
the textconv of a binary file without textconv filter.  That would
certainly make the code much simpler, and more importantly, the output
would become more pleasant. We would show something like:

    - Binary blob bc3c57058faba66f6a7a947e1e9642f47053b5bb
     -Binary blob 536e55524db72bd2acf175208aef4f3dfc148d42
    ++Binary blob 67cfeb2016b24df1cb406c18145efd399f6a1792

if we did so.

When showing the working-tree version, we obviously do not have the blob
object name yet, so in such a case, we can say "Binary blob", or just
"Binary".
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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