On 23. mai 2010, at 13.51, Clemens Buchacher wrote:
That's because you don't use (or work with people who use) editors that mangle line endings without asking. Modern versions of vi and Emacs don't do this, but the problem still exists in popular Windows editors. I don't have strong feelings about the need for this feature, but it has been requested so it's probably useful.
[...]
That is correct, but "eol=lf" means that the file _should_ be LF-only in the repository. If it isn't, the repository is "corrupted". Such a file is marked as dirty when it is checked out and will be normalized to LF-only line endings when it is committed, at which point the repository will be fixed.
This should only be a problem if you set the "text" or "eol" attributes in an existing repository, or if someone adds CRLFs to a normalized file using an older version of git.
I'm sorry if I was unclear about Finn Arne's patch: "safe autocrlf" only applies when files are normalized due to core.autocrlf. If "text" or "eol" is set on a file, the file is normalized to LF-only regardless of whether it contains CRs in the repository.
I think they are symmetric in practice. While it's possible to get the repository into a state where you will get CRLFs in a text file that should be LF-only, it is both unlikely and easily fixed.
--
Eyvind
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html