Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, May 7, 2010 - 3:14 pm

On Fri, 7 May 2010, Linus Torvalds wrote:

Btw, since we're discussing this, I do think that our current "crlf=input" 
syntax for .gitattributes is pretty dubious. 

I don't really see why it should be a path-dependent thing on whether you 
do crlf conversion on just input or on checkout too.  It smells odd. It 
makes more sense to me to have a global policy for what the output/input 
conversion should be, and then the path rules are just about whether that 
conversion gets done or not.

And like it or not, we called that global rule "autocrlf", and then mixed 
it up with the decision on whether we should do conversion at all. I do 
think that that was a mistake too, and that we could try to fix it, but I 
also think that's a fairly independent issue.

So we _could_ introduce a new "core.crlf" config option that talks purely 
about what kind of conversion gets done - not about _whether_ it gets 
done. So you could do

	[core]
		crlf=input

and it would imply that crlf conversion is only done on input, but it 
would differ from "autocrlf=input" in that it would _not_ imply that any 
paths not matched by gitattributes crlf rules would be automatically 
converted.

[ And in the above model, "core.autocrlf = input" would just be a 
  shorthand for saying "core.autocrlf=true" + "core.crlf=input")

So I think we could improve the config file syntax a bit.

But I think that's really a separate issue from the .gitattributes file, 
and whether the "crlf" attribute means anythin in the _absense_ of any 
config file rules about crlf.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: What should be the CRLF policy when win + Linux?, Ramkumar Ramachandra, (Wed May 5, 6:27 am)
Re: What should be the CRLF policy when win + Linux?, Wilbert van Dolleweerd, (Thu May 6, 12:29 am)
Re: What should be the CRLF policy when win + Linux?, Erik Faye-Lund, (Thu May 6, 3:03 am)
Re: What should be the CRLF policy when win + Linux?, Linus Torvalds, (Thu May 6, 10:15 am)
Re: What should be the CRLF policy when win + Linux?, Erik Faye-Lund, (Thu May 6, 10:26 am)
Re: What should be the CRLF policy when win + Linux?, Linus Torvalds, (Thu May 6, 1:23 pm)
Re: What should be the CRLF policy when win + Linux?, Erik Faye-Lund, (Thu May 6, 1:40 pm)
[PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Thu May 6, 3:27 pm)
[PATCH/RFC 2/3] Add tests for per-repository eol normalization, Eyvind Bernhardsen, (Thu May 6, 3:27 pm)
[PATCH/RFC 3/3] Add per-repository eol normalization, Eyvind Bernhardsen, (Thu May 6, 3:27 pm)
Re: What should be the CRLF policy when win + Linux?, Erik Faye-Lund, (Thu May 6, 4:25 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 12:23 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 12:25 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Finn Arne Gangstad, (Fri May 7, 12:41 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 1:11 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 1:42 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 2:17 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Fri May 7, 2:37 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, A Large Angry SCM, (Fri May 7, 3:09 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Linus Torvalds, (Fri May 7, 3:14 pm)
Re: [PATCH/RFC 0/3] Per-repository end-of-line normalization, Eyvind Bernhardsen, (Sun May 9, 12:49 am)
Re: What should be the CRLF policy when win + Linux?, Anthony W. Youngman, (Tue May 18, 8:13 am)