Thread (32 messages) flat view 32 messages, 7 authors, 2016-06-15

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

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:48:47

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help