diff options
author | Jeff King <peff@peff.net> | 2011-05-23 16:27:34 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-23 15:43:43 -0700 |
commit | 4d5f34719970274990cded2201957eb2262bca10 (patch) | |
tree | 244a8649d9783237d7d83f123946593cd57a3b3f /http-fetch.c | |
parent | combine-diff: calculate mode_differs earlier (diff) | |
download | tgif-4d5f34719970274990cded2201957eb2262bca10.tar.xz |
combine-diff: handle binary files as binary
The combined diff code path is totally different from the
regular diff code path, and didn't handle binary files at
all. The results of a combined diff on a binary file could
range from annoying (since we spewed binary garbage,
possibly upsetting the user's terminal), to wrong (embedded
NULs caused us to show incorrect diffs, with lines truncated
at the NUL character), to potential security problems
(embedded NULs could interfere with "-z" output, possibly
defeating policy hooks which parse diff output).
Instead, we consider a combined diff to be binary if any of
the input blobs is binary. To show a binary combined diff,
we indicate "Binary blobs differ"; the "index" meta line
will show which parents had which blob.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-fetch.c')
0 files changed, 0 insertions, 0 deletions