Re: CRLF problems with Git on Win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 11, 2008, at 6:25 PM, Linus Torvalds wrote:



On Fri, 11 Jan 2008, Steffen Prohaska wrote:

No. What would it help?

You may later decide that you want to check out your project on Windows.
In this case your repository should not contain CRLF.  autocrlf=input
ensures this.

But under Unix, it would never do that *anyway*, unless the file for some
reason really needs it (which I cannot imagine, but I've never seen
anything so craptastically stupid that some crazy person hasn't done it)

So your argument is bogus.

Ah sorry, I misunderstood you in [1].  I thought your last point
"Mixed Windows usage" meant what I have in mind:  A user working
in a mixed Windows/Unix environment who creates a file using
Windows tools and commits it in the Unix environment.  In this
case the CRLF file will be transferred from Windows to Unix
without git being involved.  The right thing for git on Unix is
to remove CRLF during a commit but still write only LF during
check out.  So autocrlf=input is the right choice.

[1] http://article.gmane.org/gmane.comp.version-control.git/70082

It happens that people working in a mixed environment do such things.
They just copy files from Windows to Unix and commit there.  Not very
often, but it happens.  So it would be nice if git would handle this
situation and it actually can by setting autocrlf=input.

My point is that perfect support for mixed environments requires
that git removes CRLF from any input on any platform.  However,
git should behave differently during checkout.  In this case the
native line ending should be written (LF on Unix, CRLF on
Windows).  The difference happens during check out; commit should
be handled identically.

	Steffen


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux