curl-library
Re: cmake totally broken, subject for removal
Date: Wed, 24 Mar 2010 10:31:23 -0400
Daniel Stenberg wrote:
> On Wed, 24 Mar 2010, Bill Hoffman wrote:
>
>> I will fix it...
>
> Thanks! You're also added to the github repo, so you can push your
> changes whenever you like!
>
Thanks, I think I might be the first person to clone from that git repo
on windows... :)
There is a "feature" with git and windows and crlf, that causes files to
be always modified after a clone.
The files affected in curl are the tests/data/test* and vc6curl.dsw.
...
# modified: tests/data/test99
# modified: vc6curl.dsw
Here is what happens:
(1) Files get added with CRLF (Windows) newlines
(which is correct; .dsw files should have them)
(2) Git on Windows (msysgit) enables core.autocrlf globally
(3) The clone with autocrlf enabled checks out the file with
CRLF newlines (correctly).
(4) Now "git status" reports the modified file even to the human
Here is what goes wrong:
(5) During "git status" Git reads the file from the work tree
and autocrlf converts CRLF -> LF in its stat cache.
(6) Git compares the file in the repository (with CRLF) to the
one it cached from the work tree (with LF) ==> modified!
Here is a fix:
$ cat .gitattributes
*.dsw -crlf
$ cat tests/data/.gitattributes
test* -crlf
This will tell git that the files should not have
any crlf conversion applied. The question I have is about the
test/data/test*. Is it intentional that those files have windows CRLF?
If not, then they were added with that by mistake, and a different fix
needs to be done.
-Bill
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-24