From: Clemens Buchacher <drizzd@aon.at>
To: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Cc: Finn Arne Gangstad <finnag@pvv.org>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: What's cooking extra
Date: Sun, 23 May 2010 00:27:46 +0200 [thread overview]
Message-ID: <20100522222746.GA2694@localhost> (raw)
In-Reply-To: <50199F1F-3513-43A6-8990-957F3D0AF58C@gmail.com>
Hi Eyvind,
Thanks for the extended summary. I still have several doubts, as
detailed below. But I understand that this has been heavily
discussed and if the discussion has indeed come to a conclusion,
then I will not complain about it now.
On Sat, May 22, 2010 at 09:42:14PM +0200, Eyvind Bernhardsen wrote:
> On 22. mai 2010, at 15.09, Clemens Buchacher wrote:
>
> > As soon as the existing crlf attribute is given priority over
> > core.autocrlf, all the problems discussed originally go away.
> > So what exactly are the new attributes supposed to do?
For all my comments below I am assuming that the behavior of
autocrlf will be changed to respect the crlf/text attribute by
default.
> There is one new attribute, "eol", that is used for files which
> need a specific line ending. Being able to "force" LF or CRLF
> line endings has been requested several times on the list, and is
> already sort of provided for by "crlf=input".
[...]
> Any file with the "text" attribute set will have its line endings
> normalized to LF in the repository. If "text" is set to the
> special value "auto", git will only convert the file if it looks
> like a text file.
>
> The "eol" attribute is used for files that need a specific line
> ending. Setting it also sets "text".
If a file needs specific line endings, why enable conversion for
this file at all? Just make sure the repository contains the
correct version and unset the crlf attribute.
> core.eol controls which line endings to use for normalized files
> that don't have the "eol" attribute set, and defaults to the
> platform native line ending.
That makes sense to me, except for the part where I need a per-file
attribute.
> When core.autocrlf is set, the default value of the "text"
> attribute is set to "auto" but with an extra safety feature: if a
> file contains CRs in the index, it won't be normalized. The
> extra feature comes from Finn Arne's "safe autocrlf" patch.
>
> There is a backwards compatibility wrinkle in that core.autocrlf
> will override core.eol if the latter isn't explicitly set, so
> that "core.autocrlf=true" still results in CRLFs in the working
> directory on Linux.
This also makes sense. I just fear that making this frequently
misunderstood feature even more complex will only confuse users
further.
I do see the value of a global core.eol option, however, since it
allows me to convert to LF instead of CRLF, which AFAIK is not
currently possible.
On the other hand, this will cause users to stop caring whether or
not a file in the repository has LF or CRLF line endings. I am not
sure if that is a good thing, but I suppose it is better than what
we have now.
> > And, renaming the crlf attribute to text? Where did Linus suggest that? If
> > we do that, we don't even have to talk about backwards compatibility any
> > more.
>
> In <alpine.LFD.2.00.1005121824260.3711@i5.linux-foundation.org>:
> > So if you rename these things, keep them separate. Make the "am I a
> > text-file" boolean be a boolean (plus "auto"), and just call it "text".
> > And make the "what end of line to use" be just "eol" then.
I see. Well, if we rename the "crlf" attribute then we will have a
macro attribute "binary" and an attribute "text", which are not the
opposite of each other. That is a bit strange.
> The "crlf" attribute will be used if it is present so backwards
> compatibility is preserved to a degree.
Ah, ok. That is fine then.
> Scripts that test for
> the "crlf" attribute explicitly (such as git-cvsserver, which I
> fixed) will break. I don't know how big a problem that is going
> to be in practice, but nobody raised it as an issue during the
> discussion.
I agree that should not be a big issue.
Regards,
Clemens
next prev parent reply other threads:[~2010-05-22 22:31 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 14:33 What's cooking extra Junio C Hamano
2010-05-19 15:12 ` A Large Angry SCM
2010-05-19 17:06 ` Finn Arne Gangstad
2010-05-19 20:09 ` Eyvind Bernhardsen
2010-05-22 13:09 ` Clemens Buchacher
2010-05-22 19:42 ` Eyvind Bernhardsen
2010-05-22 22:27 ` Clemens Buchacher [this message]
2010-05-23 10:36 ` Eyvind Bernhardsen
2010-05-23 11:51 ` Clemens Buchacher
2010-05-23 12:53 ` Eyvind Bernhardsen
2010-05-23 13:26 ` Ævar Arnfjörð Bjarmason
2010-05-24 9:49 ` Clemens Buchacher
2010-05-24 12:47 ` Dmitry Potapov
2010-05-24 20:45 ` Eyvind Bernhardsen
2010-05-24 20:56 ` Clemens Buchacher
2010-05-24 21:09 ` Eyvind Bernhardsen
2010-05-24 21:11 ` Eyvind Bernhardsen
2010-05-24 22:11 ` Clemens Buchacher
2010-05-25 6:41 ` Eyvind Bernhardsen
2010-05-25 8:27 ` Anthony Youngman
2010-06-07 19:55 ` Eyvind Bernhardsen
2010-05-25 8:33 ` Clemens Buchacher
2010-05-24 12:12 ` Dmitry Potapov
2010-05-24 12:22 ` Erik Faye-Lund
2010-05-24 12:42 ` Dmitry Potapov
2010-05-21 16:16 ` Ævar Arnfjörð Bjarmason
2010-05-22 21:24 ` René Scharfe
2010-05-22 21:26 ` [PATCH 1/8] grep: add test script for binary file handling René Scharfe
2010-05-22 21:28 ` [PATCH 2/8] grep: grep: refactor handling of binary mode options René Scharfe
2010-05-22 21:29 ` [PATCH 3/8] grep: --count over binary René Scharfe
2010-05-22 21:30 ` [PATCH 4/8] grep: --name-only " René Scharfe
2010-05-22 21:32 ` [PATCH 5/8] grep: use memmem() for fixed string search René Scharfe
2010-05-22 21:34 ` [PATCH 6/8] grep: continue case insensitive fixed string search after NUL chars René Scharfe
2010-05-22 21:35 ` [PATCH 7/8] grep: use REG_STARTEND for all matching if available René Scharfe
2010-05-22 21:43 ` [PATCH 8/8] grep: support NUL chars in search strings for -F René Scharfe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100522222746.GA2694@localhost \
--to=drizzd@aon.at \
--cc=eyvind.bernhardsen@gmail.com \
--cc=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).