Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Potapov
Date: Friday, July 25, 2008 - 7:01 am

On Fri, Jul 25, 2008 at 02:30:16PM +0200, Eyvind Bernhardsen wrote:

I suppose "* eol=auto" means to convert CRLF->LF on checkin and
LF->native on checkout?

Also, perhaps, it should be also possible to explicitly specify:
*.txt eol=native
which is the same as 'auto' but without guessing whether it is text
or not.


I think the real issue here is not as much about being or not being
versioned, but about forcing and not forcing anything on users.

If we had core.autocrlf=input as default then clueless users will not
checkin files with the incorrect ending. But there is an objection to
that -- you penalize those who always have good endings. And even the
fact that is merely default value that you can easily change to false
does not convince everyone.

The same can be said about your
* eol=auto
It forces conversion on everyone, even on those who do not need it.
Of course, you can say those projects that do not have the problem with
clueless users putting text files with incorrect end-of-lines will not
have lines like that in their .gitattribute. Yet, if I participate in
that project, why do I have to pay the price for this conversion just
because someone stupid can mess up line-endings?


Actually, there is

*.sh crlf=input

i.e. I want my shell files to have LF even I normally use CRLF for
all other files (on Windows).


Following your style above, I believe it should be defined as
native-eol=crlf

but there are people who do not want to pay any price for conversion.
Currently, "core.autocrlf=false" means to do nothing about end-of-lines,
and even to ignore setting in .gitattributes. Should it be possible to
disable *any* conversion on checkin and checkout? Should this be that
value be the default, which most users use?

Dmitry
--
If you write a program that any idiot can use, only idiots will use it.
--
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: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Wed Jul 23, 10:22 am)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Wed Jul 23, 11:57 am)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Wed Jul 23, 12:20 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Wed Jul 23, 12:41 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Wed Jul 23, 12:44 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Wed Jul 23, 1:07 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Thu Jul 24, 10:14 am)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Thu Jul 24, 2:30 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Thu Jul 24, 5:01 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Fri Jul 25, 5:30 am)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Dmitry Potapov, (Fri Jul 25, 7:01 am)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Fri Jul 25, 2:05 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Johannes Schindelin, (Fri Jul 25, 7:09 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Tue Jul 29, 12:11 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Tue Jul 29, 2:17 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Steffen Prohaska, (Tue Jul 29, 10:35 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Steffen Prohaska, (Wed Jul 30, 12:25 pm)
Re: [PATCH] Respect crlf attribute even if core.autocrlf h ..., Eyvind Bernhardsen, (Sat Aug 2, 5:51 am)