On Jan 8, 2008, at 6:29 PM, J. Bruce Fields wrote:

On Mon, Jan 07, 2008 at 10:40:56PM +0100, Steffen Prohaska wrote:
Eventually I gave in and even voted for "Git does not modify
content unless explicitly requested otherwise".

Here's the full discussion:

http://code.google.com/p/msysgit/issues/detail?id=21

I believe the main question is which type of projects we would like
to support by our default. For real cross-platform projects that will
be checked out on Windows and Unix we should choose
"core.autocrlf true" as our default.  But if our default are native
Windows projects that will never be checked out on Unix, then we
should not set core.autocrlf by default.

If the policy really depends on the project, then surely the default
behavior should be determined by information carried in the project
itself (e.g., the .gitattributes)?

Unfortunately it depends on the project _and_ the platform.  A
cross-platform project should have core.autocrlf=input on Unix and
core.autocrlf=true on Windows.  I don't think I can represent this
with the current .gitattributes.

Do you suggest to add this kind of magic to .gitattributes? Such as
to have .gitattributes containing

--- SNIP ---
* crlf=autonative
--- SNIP ---

which would tell git to act as if core.autocrlf=input was set on Unix
and core.autocrlf=true was set on Windows.


For that reason it strikes me as a mistake to ignore the crlf attribute by default (assuming that is indeed the current behavior; apologies for
not checking).  If crlf is set then I think it should be assumed that
crlf conversion should be done unless that has been explicitly turned
off somehow.

I don't understand this comment.

msysgit installs plain git.  core.autocrlf is unset.  Whatever plain
git's default is, this is msysgit's default, too.

        Steffen


Reply via email to