Subject: Re: autocrlf

From: Johannes Sixt <[email-masked]>
Date: Fri, 18 May 2007 13:45:43 +0200

Andy Parkins wrote:
> What I had imagined was that I could use .gitattributes to tell git which
> files in my tree were text.  Then the line endings on checkout would be set
> as appropriate to my platform, and on check in set to LF.
> 
> What actually happens is that any file with the crlf attribute is being
> checked out with LF expanded to CRLF (I'm running Linux of course), which is
> completely not what I wanted.

If I understand the documentation correctly
(Documentation/gitattributes.txt) then you set core.autocrlf to true on
Windows and false everywhere else, and things should start working like
you imagined.

I have not checked whether the behavior is according to the
documentation, though.

-- Hannes