Re: possible gitattributes eol bug with new eol=crlf | lf support?
On 10. sep. 2010, at 00.31, Robert Buck wrote:
[...]
Show 6 quoted lines
> Conversion of LF-EOL files to CRLF works fine, but conversion of CRLF
> to LF fails to occur.
>
> The doc is a little unclear if this is expected behavior, which if I
> recall correctly from the email threads related to the new eol
> support, this should not have occurred.
Unfortunately, this is expected behaviour: you need to "manually" remove CRLFs when you turn on eol conversion. The simplest way to do this is "rm .git/index && git reset", then commit the modified files (ideally in the same commit that modifies .gitattributes--this is mentioned in gitattributes(5)).
To make this work as it should, git would have to notice changes to .gitattributes and check files which have had their attributes changed. It's on my "I wish I had time to do this" list.
- Eyvind