Revision 4aff646d17e81084000100da586bef8f9d6a17a5 authored by René Scharfe on 05 March 2015, 19:06:02 UTC, committed by Junio C Hamano on 05 March 2015, 23:27:48 UTC
Set the text flag for ZIP archive entries that look like text files so that unzip -a can be used to perform end-of-line conversions. Info-ZIP zip does the same. Detect binary files the same way as git diff and git grep do, namely by checking for the attribute "diff" and its negation "-diff", and if none is found by falling back to checking for the presence of NUL bytes in the first few bytes of the file contents. 7-Zip, Windows' built-in ZIP functionality and Info-ZIP unzip without the switch -a are not affected by the change and still extract text files without doing any end-of-line conversions. NB: The actual end-of-line style used in the archive entries doesn't matter to unzip -a, as it converts any CR, CRLF and LF to the line end characters appropriate for the platform it is running on. Suggested-by: Ulrike Fischer <luatex@nililand.de> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 282616c
File | Mode | Size |
---|---|---|
xdiff.h | -rw-r--r-- | 3.6 KB |
xdiffi.c | -rw-r--r-- | 15.7 KB |
xdiffi.h | -rw-r--r-- | 2.0 KB |
xemit.c | -rw-r--r-- | 6.9 KB |
xemit.h | -rw-r--r-- | 1.2 KB |
xhistogram.c | -rw-r--r-- | 9.0 KB |
xinclude.h | -rw-r--r-- | 1.2 KB |
xmacros.h | -rw-r--r-- | 1.9 KB |
xmerge.c | -rw-r--r-- | 15.1 KB |
xpatience.c | -rw-r--r-- | 9.9 KB |
xprepare.c | -rw-r--r-- | 12.0 KB |
xprepare.h | -rw-r--r-- | 1.1 KB |
xtypes.h | -rw-r--r-- | 1.6 KB |
xutils.c | -rw-r--r-- | 11.0 KB |
xutils.h | -rw-r--r-- | 1.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...