Re: CRLF problems with Git on Win32

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

 



On Tue, Jan 08, 2008 at 07:58:57PM +0100, Steffen Prohaska wrote:
>
> On Jan 8, 2008, at 7:07 PM, Junio C Hamano wrote:
>
>>
>>
>> Steffen Prohaska <prohaska-wjoc1KHpMeg@xxxxxxxxxxxxxxxx> writes:
>>
>>> msysgit installs plain git.  core.autocrlf is unset.  Whatever plain
>>> git's default is, this is msysgit's default, too.
>>
>> That sounds like a mistake if you are installing a port to a
>> platform whose native line ending convention is different from
>> where plain git natively runs on (i.e. UNIX).
>
> We failed to agree on a better default and as the lengthy
> discussion documents, the best default isn't obvious.
>
> I don't think a solution will be found by declaring one platform
> native (UNIX) and all other platform non-native.  The question to
> answer is how to support cross-platform projects.  A valid
> solution should never corrupt data unless the user explicitly
> told git to do so.

My only suggestion is that we consider allowing the user that
"explicitly told git to do so" be the project maintainer.  So if you

	echo * autodetectcrlf >.gitattributes
	git add .gitattributes
	git commit

then users that clone your repo will get that default without having to
be told to do something magic on clone.

(And ideally I'd've hoped you could do that using the existing crlf
attribute rather than having to invent something new, but maybe that
doesn't work.)

--b.

> I don't believe it is a valid solution to set
> core.autocrlf=true on Windows and tell the users: "Well, in its
> default settings, git sometimes corrupts your data on Windows.
> Maybe you want to switch to Linux because this is the native
> platform where data corruption will never happen."
>
> I'd prefer the "warn/fail" proposal.
>
> 	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