Re: mingw, windows, crlf/lf, and git
- From
- Alexander Litvinov <litvinov2004@gmail.com>
- Date
- Feb 13, 2007, 03:32 UTC
- Message-ID
- <200702130932.51601.litvinov2004@gmail.com>
- In-Reply-To
- <45CFA30C.6030202@verizon.net>
В сообщении от Monday 12 February 2007 05:13 Mark Levedahl написал(a):
Show 6 quoted lines
> 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.
I am strongly object this statement. I develop one project under Windows and use Cygwin git for this. Yes, I have a problem with git's thinking line ending is a \n but most of troubles are diff and rebase. In general git works well with \r\n line endings.
When I have file that was converted from dos to unix format (or from unix to dos) git genereta big diff. But anyway, c++ compiler works well with both formats and in this case I simply convert file to dos format and git shows again nice diff. If unix format was commited to git I simply change the format and commit that file again.
The only trouble is the rebase, it does not like \r\n ending and othen produce unexpected merge conflict. But I don't use rebse to othen to realy investigate and try to solve the problem.