Thread (32 messages) flat view 32 messages, 7 authors, 2016-06-15

Re: [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control end-of-line conversion

From: Eyvind Bernhardsen <hidden>
Date: 2016-06-15 22:48:46

On 9. mai 2010, at 09.00, Dmitry Potapov wrote:
On Sun, May 09, 2010 at 12:53:17AM +0200, Eyvind Bernhardsen wrote:
quoted
On 9. mai 2010, at 00.17, Eyvind Bernhardsen
[off-list ref] wrote:
quoted
I'll try to think of a better name.
Heh. How about "localcrlf={true,false,native}"?
IMHO, the 'local' prefix certainly does not improve anything. Also,
I would rather call default as "default" instead of "native". So,
why not use "core.crlf={true, false, default}"?

Though crlf is not my preferable name, I think consistency is important,
and we should use the same name here as in git attributes.
But the attribute does something different!  The attribute turns eol conversion on and off, the configuration variable decides which line endings to use when conversion is on.  They should be related, but making them identical doesn't make any kind of sense.

To be consistent, I would expect a variable called "core.crlf" to do the same thing as the attribute, so "core.crlf=auto" would replace "core.autocrlf={true,input}", allowing you to turn on line ending conversion without having to modify the repository.

If we added this consistently named "core.crlf", we'd still need a separate config variable to decide between LFs and CRLFs in the working directory, so what should that variable be called?

"localcrlf" at least conveys the idea that this is a local setting, so it's not too much of a stretch to guess that it controls the working directory.
-- 
Eyvind
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help