Re: [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control end-of-line conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 10, 2010 at 09:25:11AM -0400, Robert Buck wrote:
> Today I am writing up some documentation related to Git use at the
> company, and planning to check in all the data from Git vs Hg testing,
> and all on-boarding/first-day documentation related to Git use. So
> within the directory containing all these files I init-ed the
> repository and got this when I attempted to add multiple files. Mind
> you, this is on Linux!
> 
>   "warning: LF will be replaced by CRLF"

It looks like you set core.autocrlf to true on Linux.

The problem is core.autocrlf says two things -- whether you want to
enable automatic eol conversion for text files and whether you have CRLF
for text files. Only if the answer is "yes" to both then you should set
it to true. In other words, you should never set it to true on Linux.

You may want use core.autocrlf=input on Linux to avoid text files being
accidentally commit with a wrong encoding, when they were copied from
Windows directly.

> 
> This _really_ of scares me being that this was on Linux. Is this one
> of the problem spots that the topic of this thread attempts to
> resolve?

Yes, we want to have a separate setting, whihc will tell what is EOL on
your system, and it should have sensible default, i.e. LF on Linux and
CRLF on Windows.


Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]