CRLF line endings in source repository

Hi! I noticed couple of files have Windows (CRLF) line endings in official repository on GitHub, namely: $ find . -iname "*.java" -exec file {} \; | grep CRLF ./logback-examples/src/main/java/chapters/architecture/SelectionRule.java: ASCII Java program text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/T_Entry.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/LRUCache.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/T_LRUCache.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/Event.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/Simulator.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/LRUCacheTest.java: ASCII English text, with CRLF line terminators ./logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java: ASCII English text, with CRLF line terminators ./logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java: ASCII English text, with CRLF line terminators These files are marked as modified immediately after cloning fresh copy of the repository (all lines modified). I am using Ubuntu 10.10, Git 1.7.1, core.autocrlf=input. Can somebody please fix EOLs to LF in the files above and push the changes? It causes me a headache when trying to merge with official repo as I am not very fammiliar with Git. Thanks in advance! -- Tomasz Nurkiewicz http://nurkiewicz.blogspot.com

Hi Thomas, I would like to solve this problem but am not an autocrlf expert. Once on a Windows on a Linux host, I cloned a fresh copy a did not notice the problem you describe. I had autocrlf = true. On the Linux machine, removing autocrlf did not seem to make any difference. Can you try with autocrlf = true and with autocrlf unset? Cheers, -- Ceki On 29.03.2011 19:28, Tomasz Nurkiewicz wrote:
Hi!
I noticed couple of files have Windows (CRLF) line endings in official repository on GitHub, namely:
$ find . -iname "*.java" -exec file {} \; | grep CRLF ./logback-examples/src/main/java/chapters/architecture/SelectionRule.java: ASCII Java program text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/T_Entry.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/LRUCache.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/T_LRUCache.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/Event.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/Simulator.java: ASCII English text, with CRLF line terminators ./logback-classic/src/test/java/ch/qos/logback/classic/turbo/lru/LRUCacheTest.java: ASCII English text, with CRLF line terminators ./logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java: ASCII English text, with CRLF line terminators ./logback-core/src/main/java/ch/qos/logback/core/pattern/parser/SimpleKeywordNode.java: ASCII English text, with CRLF line terminators
These files are marked as modified immediately after cloning fresh copy of the repository (all lines modified). I am using Ubuntu 10.10, Git 1.7.1, core.autocrlf=input. Can somebody please fix EOLs to LF in the files above and push the changes? It causes me a headache when trying to merge with official repo as I am not very fammiliar with Git.
Thanks in advance!

I would like to solve this problem but am not an autocrlf expert.
Me neither, but I can definitely see some inconsistencies in the repo when it comes to EOL. I downloaded few files directly bypassing git: $ wget -q --no-check-certificate https://github.com/ceki/logback/raw/master/logback-core/src/main/java/ch/qos... $ wget -q --no-check-certificate https://github.com/ceki/logback/raw/master/logback-core/src/main/java/ch/qos... $ file EnvUtil.java FileSize.java EnvUtil.java: ASCII English text, with CRLF line terminators FileSize.java: ASCII English text EnvUtil.java is one of the files being marked as modified after fresh clone, while FileSize.java is not. As for cloning, when I change my core.autocrlf setting either to false or to true, no modified files are shown after clone. Only /input/ causes problems - but this is a recommended Linux setting [1]; also for sure some files with CRLF leaked into the repository.
Once on a Windows on a Linux host, I cloned a fresh copy a did not notice the problem you describe. I had autocrlf = true. On the Linux machine, removing autocrlf did not seem to make any difference.
Can you try with autocrlf = true and with autocrlf unset?
Cheers,
pozdrowienia -- Tomasz Nurkiewicz http://nurkiewicz.blogspot.com
participants (2)
-
Ceki Gulcu
-
Tomasz Nurkiewicz