Thread (31 messages) flat view 31 messages, 10 authors, 2016-06-15

Re: mingw, windows, crlf/lf, and git

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:42:54

tisdag 13 februari 2007 20:36 skrev Mark Levedahl:
Alexander Litvinov wrote:
quoted
? ????????? ?? Tuesday 13 February 2007 16:06 Johannes Schindelin
???????(a):
quoted
Hi,

On Tue, 13 Feb 2007, Alexander Litvinov wrote:
quoted
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.
That's awful!
If you are tring to build history that looks good - you are right this is
a terrible workflow.
quoted
quoted
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.
Well, if everybody thinks like you, maybe we do not have to change
anything for Windows after all?
I still wish to have working rebase so if git will hanle somehow \r\n it
would be nice. But please do not produce the same behavior as cvs does:
under cygwin it still use \n !
Cygwin != Windows, Cygwin is a POSIX emulation layer with the explicit goal
of providing user tools behaving exactly as they do under Linux, and this
includes line ending style.
Line ending style is selectable in cygwin, both on a global level and path level (cygwin 
mounts). If you use CVS for windows development using CRLF works well and
is the only option if you want to use the same working are with both native CVS clients
like TortoiseCVS and the cygwin client. I use the CRLF style by default and LF only
for selected directories. The only annoying thing I see is that files transformed by patch end 
up with LF-only line endings.
So, the Cygwin ports of various Linux tools are not expected to satisfy
users who want native Win32 behavior. This is where the mingw port of git
fits in. Yes, under Cygwin git can track files with \r\n endings, but: 
1) Those projects are not portable to non-windows platforms, and 
2) As you noted, git will have trouble with rebase, merge, etc. as there is
an assumption of \n endings throughout.
Even if there is a native port, I'm inclined to want to use the cygwin version 
anyway because of the nice shell and scripting capabilities and large selection of packages
that match what I'm used to in Linux. Git under cygwin should do CRLF transformations 
according to the same rules that apply to text files in cygwin.

-- robin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help