Thread (1 message) 1 message, 1 author, 2016-06-15

Re: CRLF problems with Git on Win32

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:03

"J. Bruce Fields" [off-list ref] writes:
On Tue, Jan 08, 2008 at 07:58:57PM +0100, Steffen Prohaska wrote:
quoted
...
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.)
I think the project can mark text files as text with attributes
and if the port to the platform initialized core.autocrlf
appropriately for the platform everything should work as you
described. 

At least that is how I read the description of `crlf` in
gitattributes(5).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help