From: "René Scharfe" <l.s.r@web.de>
To: luatex@nililand.de, git@vger.kernel.org
Subject: Re: zip files created with git archive flags text files as binaries
Date: Wed, 04 Mar 2015 22:13:17 +0100 [thread overview]
Message-ID: <54F7756D.6080907@web.de> (raw)
In-Reply-To: <54EB7FE4.7070804@web.de>
Am 23.02.2015 um 20:30 schrieb René Scharfe:
> Am 23.02.2015 um 14:58 schrieb Ulrike Fischer:
>> The zip contained four text files and a pdf.
>>
>> The CTAN maintainers informed me that all files in the zip are
>> flagged as binaries and this makes it difficult for them to process
>> them further (they want to correct line feeds of the text files:
>> http://mirror.ctan.org/tex-archive/help/ctan/CTAN-upload-addendum.html#crlf)
By the way, a workaround for CTAN could be to extract the files using
unzip and zip them again using Info-ZIP zip (one of the "good zip
programs" mentioned on that website). The result will be a ZIP file
with text files flagged appropriately. Just saying.
>> Would it be possible to correct the zip-backend so that it flags
>> text files correctly? Or alternativly could one configure git
>> archive to use another zip programm?
>
> We would have to detect the line ending format (DOS, Unix, Macintosh,
> etc.) of each file, then set the attribute "t" (text) and the host
> system. The detection would slow down archive creation a bit and the
> resulting files would be different, of course, so this feature should
> only be enabled by a new command line option. I'll take a look.
Actually its easier than that. unzip -a (with end-of-line conversion)
doesn't care for the actual format, it simply converts all occurrences
of CR, CRLF and LF to the appropriate newline chars for the platform it
is running on if the text flag is set. Files with mixed line endings
are normalized, i.e. they have a consistent end-of-line style afterward.
I'll send a first patch shortly.
René
next prev parent reply other threads:[~2015-03-04 21:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 13:58 zip files created with git archive flags text files as binaries Ulrike Fischer
2015-02-23 19:30 ` René Scharfe
2015-03-04 21:13 ` René Scharfe [this message]
2015-03-04 21:13 ` [PATCH] archive-zip: add --text parameter René Scharfe
2015-03-05 2:16 ` Junio C Hamano
2015-03-05 15:27 ` René Scharfe
2015-03-05 15:27 ` René Scharfe
2015-03-05 19:06 ` [PATCH v2] archive-zip: mark text files in archives René Scharfe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F7756D.6080907@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
--cc=luatex@nililand.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).