mingw, windows, crlf/lf, and git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am NOT intending to start a flamewar O:-) , so please don't turn this into one.

The recent threads on a mingw git port are explicit in the intent to provide a Windows native git. I believe there is a fundamental conflict here with the position, clearly stated by Linus, that git does not alter content in any way. Windows suffers the curse of DOS line endings (\r\n vs \n), and a true port to Windows *must* allow for \r\n and \n to be semantically the same thing as most large projects end up with a mixture of such files and/or are targeting cross-platform capabilities. The major competing solutions git seeks to supplant (cvs, cvsnt, svn, hg) have capability to recognize "text" files and transparently replace \r\n with \n on input, the reverse on output, and ignore all such differences on diff operations. To be relevant on native Windows, git must do the same. Otherwise, git will be deemed "too wierd" and dismissed in favor of a tool "that works."

There is no use to debating the technical merits of \r\n vs \n vs \r vs whatever, nor of not converting. Really. Just accept that there is a fundamental requirement that any version control tool on Windows be able to silently convert between \r\n and \n. To believe otherwise is to expect that the conversion be pushed elsewhere into the tool chain in use, and that won't happen as the competition already provide this conversion capability.

So, I think the git project needs to come to an explicit position on this, basically being:

1) git is a POSIX only tool (i.e., there will be no \r\n munging), or
2) a Windows port of git will handle and mung \r\n and \n line endings.

If the answer is 1, the mingw port is a waste of time as it simply won't be usable by its target audience. If the answer is 2, then I think a very careful design of this capability is in order.

Comments?

BTW, I have addressed this in my own world using a pre-commit script that converts textfile line endings into \n, recognizing that our Windows tool chain handles such files perfectly well, while our Linux toolchain requires it.

Mark Levedahl

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]