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
History
File Mode Size
.gitignore -rw-r--r-- 7 bytes
README -rw-r--r-- 9.9 KB
TEAMS -rw-r--r-- 1.7 KB
bg.po -rw-r--r-- 322.5 KB
de.po -rw-r--r-- 321.6 KB
fr.po -rw-r--r-- 316.8 KB
git.pot -rw-r--r-- 198.7 KB
is.po -rw-r--r-- 3.1 KB
it.po -rw-r--r-- 128.2 KB
pt_PT.po -rw-r--r-- 99.8 KB
sv.po -rw-r--r-- 307.0 KB
vi.po -rw-r--r-- 343.9 KB
zh_CN.po -rw-r--r-- 299.2 KB

README

back to top