From: Steffen Prohaska Date: Fri, 11 Jan 2008 16:28:47 GMT Subject: Re: CRLF problems with Git on Win32 Message-ID: In-Reply-To: On Jan 11, 2008, at 4:58 PM, Linus Torvalds wrote: > > > On Fri, 11 Jan 2008, Steffen Prohaska wrote: >> >> Are you also for "autocrlf=input" as the default on Unix? > > No. What would it help? You may later decide that you want to check out your project on Windows. In this case your repository should not contain CRLF. autocrlf=input ensures this. So given the current options, autocrlf=input is the only reasonable default on Unix if git wants to support cross-platform development as its default. > "autocrlf" on Windows actually helps you (big upside, very small > downside). On Unix or other sane systems, it has zero upside, so > while the > risk is still very small, there is now no big upside to counteract it. autocrlf=input on Unix helps cross-platform development, too. > Again, what is "default" supposed to be? I argue that it's supposed > to be > the thing that is right for 99.9% of all people. And that simply isn't > true on Unix. autocrlf=input is true for the very same people that need autocrlf=true on Windows. Every developer who ever plans to check out his code on Windows and on Unix should have these default. I don't think the CRLF problem is a Windows vs. Unix discussion. In my view, the discussion is wether git will have real cross- platform support as its default or not. The current default is sane for native Unix or native Windows projects. For cross- platform projects the default needs to be changed in the way described above. Git needs to ensure that CRLF never enters the repository for text files. If you did not set autocrlf=true, copying source code from Windows to Unix would not be supported. But as you earlier mentioned, this seems to be a common operation and I am observing the same. So I recommend autocrlf=input on Unix if you plan to ever go cross-platform. Steffen