I am researching the best autocrlf
setting for GIT and I am confused about what happens with code pasted into the editor if it is set to false. I notice many people recommend setting it to false, mentioning that as long as proper and properly set editors are used then there should be no problems, and I can understand this if I write ALL the code in the file; but I am confused about how this setting would work if I copy a snippit from eg a browser, or maybe some old code or something, or what if i used an entire old file. Surely I could easily end up with mixed CRLF and LF's as some of the code I get might be CRLF and some LF? Or are editors so smart that they themselves convert any pasted in code on save?
EDIT:I suppose I should also be asking: Is it a real problem if the EOF's are mixed?
The idea is, in order to avoid any issue with EOF, to use only editors:
That way:
core.autocrlf
to false
(no conversion done automagically by git, unless you really need to: see "Why should I use core.autocrlf=true
in Git?")