From: Segher B. <se...@ke...> - 2010-12-07 16:43:47
|
>>>>> "text" for git means "do whatever line ending conversions you asked >>>>> for", etc. It's the default on all files. It does not mean "LF". >>>> >>>> [...] I still don't get how >>>> "text" does not equate "LF" >> >> I've seen both assumptions throughout this thread, which is why I >> pointed >> this out. Segher's response is on the same page with me. > > I'm considering text from the point of view of the repo, so maybe that's > my mistake. A "text" file, from the user's point of view, is anything that is, well, text: documentation files, C source files, build system files, etc. On a unix system, all those have LF line endings. In a git repo, used for cross-platform development, they do as well. In mswindows environments that use LF line endings (cygwin, msys, maybe all mingw), you use autocrlf=off (or autocrlf=input), and all is fine. In mswindows environments that use CRLF line endings ("native" mswindows), you use aurocrlf=true, and all is fine. (It would seem things will work for MSVC even with autocrlf=off, but that as an aside). Yes, mswindows developers do have to consciously decide what to set autocrlf to. This can be seen as a shortcoming of git; it is nothing we can do anything about. People just have to learn to use their tools. Any kludges you can come up with to make things "magically work" will in the end just magically explode in your face (and worse, in the face of people who have nothing to do with the "problem" in the first place!) Segher |