git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Make git archive respect core.autocrlf when creating zip format archives

From
Andreas Ericsson <ae@op5.se>
Date
Sep 18, 2008, 20:21 UTC
Message-ID
<48D2B831.8080206@op5.se>
In-Reply-To
<20080918200120.GB8631@hashpling.org>
Charles Bailey wrote:
Show 19 quoted lines
> There is currently no call to git_config at the start of cmd_archive.
> When creating tar archives the core config is read as a side-effect of
> reading the tar specific config, but this doesn't happen for zip
> archives.
> 
> The consequence is that in a configuration with core.autocrlf set,
> although files in a tar archive are created with crlf line endings,
> files in a zip archive retain unix line endings.
> 
> Signed-off-by: Charles Bailey <charles@hashpling.org>
> ---
> 
> It took me a while to find the cause of the difference in behaviour
> between tar and zip format archives when all the crlf fixing code
> seemed to be in code shared by both archiving processes. I'm 99% sure
> that creating zip archives from repositories with core.autocrlf set to
> true should create zip entries with crlf line endings but it would be
> good to have that confirmed.
> 

If it fixes the broken test while all the other tests still pass, I can only assume it's doing something right.

The topic is a bit long though. Could you change it to "git archive: respect core.autocrlf when creating zip archives" so that it fits comfortably in one line when running "git log" on 80 char wide terminals?

As a side-note, you needn't put "1/1" in the [PATCH] section. That's usually done to make sure patches are applied in the right order when sending a series, but since a series of 1 is kinda hard to jumble.. ;-)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Charles BaileyNext: Charles Bailey
Message 3 of 6 in “Make git archive respect core.autocrlf when creating zip format archives”
  1. 1/1 Make git archive respect core.autocrlf when creating zip format archivesCharles Bailey, Sep 18, 2008
  2. Charles BaileySep 18, 2008
  3. Andreas EricssonSep 18, 2008
  4. Charles BaileySep 18, 2008
  5. Sverre RabbelierSep 18, 2008
  6. René ScharfeSep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.