git line endings:renormalize似乎没有检查右边的结尾

Mr_*_*s_D 7 git line-endings gitattributes

我决定通过.gitattributes文件详细设置我的行结束正确的方式- 例如这里 - 所以我将core.autocrlf设置为false并创建并提交了一个.gitattributes文件:

*.java text eol=native
*.jsp text eol=native
*.css text eol=native
*.html text eol=native
*.js text eol=native
*.xml text eol=native
*.sql text eol=native
*.MF text eol=native

# git files
*.gitignore text eol=native
*.gitattributes text eol=native

#eclipse files
*.classpath text eol=native
*.project text eol=native
*.prefs text eol=native
*.properties text eol=native
Run Code Online (Sandbox Code Playgroud)

然后我按照这里的建议发布git rm --cached -r .然后git reset --hard(也尝试过git checkout HEAD).现在所有文件都有LF行结尾.不应该是CRLF?我错过了什么?我在Windows 7上.git version 1.8.0.msysgit.0

谢谢

Mr_*_*s_D 7

它一定是个bug.奇怪的是它没有固定或报告真的 - 这整个混乱是关于窗口,它不能正确地在Windows上工作?而且在任何地方都没有提到它(?)

编辑:从mingw"最新的存储库目录"安装 - g ++,gcc,ObjC + MinGW Developer Toolkit和MSYS-1.0.11.相同的行为.每当我尝试提交CRLF文件时,我都会将CRLF替换为LF(在结帐时隐含)警告.

编辑2:似乎即将修复

编辑3:这已在Git 1.8.4中修复.

  • 最终在[Git for Windows 1.8.4](http://code.google.com/p/msysgit/downloads/list?can=1&q=1.8.4)中修复了此错误. (2认同)