mingw, windows, crlf/lf, and git

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mark Levedahl
Date: Sunday, February 11, 2007 - 4:13 pm

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mingw, windows, crlf/lf, and git, Mark Levedahl, (Sun Feb 11, 4:13 pm)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Sun Feb 11, 4:34 pm)
Re: mingw, windows, crlf/lf, and git, Robin Rosenberg, (Sun Feb 11, 5:14 pm)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Sun Feb 11, 7:37 pm)
Re: mingw, windows, crlf/lf, and git, Theodore Tso, (Sun Feb 11, 9:24 pm)
Re: mingw, windows, crlf/lf, and git, David Lang, (Mon Feb 12, 12:28 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Mon Feb 12, 4:36 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Mon Feb 12, 10:20 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Mon Feb 12, 3:37 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Mon Feb 12, 3:54 pm)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Mon Feb 12, 4:02 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Mon Feb 12, 4:02 pm)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Mon Feb 12, 4:09 pm)
Re: mingw, windows, crlf/lf, and git, David Lang, (Mon Feb 12, 4:23 pm)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Mon Feb 12, 4:24 pm)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Mon Feb 12, 4:25 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Mon Feb 12, 4:42 pm)
Re: mingw, windows, crlf/lf, and git, David Lang, (Mon Feb 12, 4:46 pm)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Mon Feb 12, 4:50 pm)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Mon Feb 12, 5:32 pm)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Mon Feb 12, 5:59 pm)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Mon Feb 12, 6:06 pm)
Re: mingw, windows, crlf/lf, and git, Shawn O. Pearce, (Mon Feb 12, 6:13 pm)
Re: mingw, windows, crlf/lf, and git, David Lang, (Mon Feb 12, 6:20 pm)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Mon Feb 12, 6:36 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Mon Feb 12, 7:02 pm)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Mon Feb 12, 8:21 pm)
Re: mingw, windows, crlf/lf, and git, Alexander Litvinov, (Mon Feb 12, 8:32 pm)
Re: mingw, windows, crlf/lf, and git, Jeff King, (Mon Feb 12, 10:18 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Mon Feb 12, 11:05 pm)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Tue Feb 13, 3:06 am)
Re: mingw, windows, crlf/lf, and git, Alexander Litvinov, (Tue Feb 13, 5:16 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Tue Feb 13, 5:37 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 9:52 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 10:23 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 10:23 am)
Re: mingw, windows, crlf/lf, and git, Nicolas Pitre, (Tue Feb 13, 10:25 am)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Tue Feb 13, 11:00 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Tue Feb 13, 11:04 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Tue Feb 13, 11:05 am)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Tue Feb 13, 11:11 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 11:39 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Tue Feb 13, 11:42 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 12:07 pm)
Re: mingw, windows, crlf/lf, and git, Sam Ravnborg, (Tue Feb 13, 1:42 pm)
Re: mingw, windows, crlf/lf, and git, Nicolas Pitre, (Tue Feb 13, 2:08 pm)
Re: mingw, windows, crlf/lf, and git, David Lang, (Tue Feb 13, 4:19 pm)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 4:28 pm)
Re: mingw, windows, crlf/lf, and git, Alexander Litvinov, (Tue Feb 13, 8:47 pm)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Tue Feb 13, 10:16 pm)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Tue Feb 13, 10:36 pm)
Re: mingw, windows, crlf/lf, and git, Sam Ravnborg, (Wed Feb 14, 1:41 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Wed Feb 14, 4:10 am)
Re: mingw, windows, crlf/lf, and git, Alexander Litvinov, (Wed Feb 14, 4:36 am)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Wed Feb 14, 7:26 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 8:44 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 8:51 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Wed Feb 14, 8:53 am)
Re: mingw, windows, crlf/lf, and git, Johannes Schindelin, (Wed Feb 14, 8:56 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 9:23 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 9:28 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 9:37 am)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Wed Feb 14, 9:39 am)
Re: mingw, windows, crlf/lf, and git, Sam Ravnborg, (Wed Feb 14, 9:47 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 10:01 am)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Wed Feb 14, 10:18 am)
Re: mingw, windows, crlf/lf, and git, Mark Levedahl, (Wed Feb 14, 10:28 am)
Re: mingw, windows, crlf/lf, and git, Junio C Hamano, (Wed Feb 14, 10:29 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 10:43 am)
Re: mingw, windows, crlf/lf, and git, Robin Rosenberg, (Wed Feb 14, 11:17 am)
Re: mingw, windows, crlf/lf, and git, Linus Torvalds, (Wed Feb 14, 11:31 am)
Re: mingw, windows, crlf/lf, and git, Robin Rosenberg, (Wed Feb 14, 1:24 pm)