This is the mail archive of the
mailing list for the Cygwin project.
Re: git on cygwin howto?
-----BEGIN PGP SIGNED MESSAGE-----
Please avoid top-posting: http://cygwin.com/acronyms/#TOFU - reformatted
>> From: Eric Blake [mailto:ebb9 AT byu DOT net]
Please avoid feeding the spammers:
http://cygwin.com/acronyms/#PCYMTNQREAIYR - munged addresses accordingly.
> That is exactly the problem. Git won't work if spurious \r appear in
> files, which is what happens on a text mount when a file is created in
> text mode and reopened in binary mode.
According to Peter Klavins on 9/23/2007 3:20 PM:
> How does the core.autocrlf config setting interact with how the
> repository is mounted? If I mounted the repository binary, but set
> core.autocrlf to translate lf to crlf, would my data files still
> translate to crlf endings when I pull from a Linux repository to
> Windows, while retaining lf endings when I pull the same repository to a
> Linux box?
Personally, I will never trust my repositories to core.autocrlf on cygwin.
But here's my guess as to what would happen.
On a text mount, your working files are likely to end up with \r\r\n
endings, when both cygwin and git try to add a \r when copying from the
repository. And when putting files back into the repository, even though
git removes \r, cygwin still puts it in, so your repository is still corrupt.
On a binary mount, the operation will work just fine. However, now you
have \r in a binary mount, and this will behave just as it does under
Linux - ie. few tools will be happy with your files, because they have
spurious \r. Yes, bash can be taught to ignore those \r via its
cygwin-specific igncr option, but what about other tools?
> That is the functionality that I need.
Why? If you are trying to emulate Linux, by using binary mounts, you
should not want \r in your files. And if you really insist on using text
mounts with git, you are probably better off trying the mingw build of git.
Don't work too hard, make some time for fun as well!
Eric Blake email@example.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html