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