Re: What's cooking extra

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eyvind Bernhardsen
Date: Sunday, May 23, 2010 - 5:53 am

On 23. mai 2010, at 13.51, Clemens Buchacher wrote:


That's because you don't use (or work with people who use) editors that mangle line endings without asking.  Modern versions of vi and Emacs don't do this, but the problem still exists in popular Windows editors.  I don't have strong feelings about the need for this feature, but it has been requested so it's probably useful.

[...]


That is correct, but "eol=lf" means that the file _should_ be LF-only in the repository.  If it isn't, the repository is "corrupted".  Such a file is marked as dirty when it is checked out and will be normalized to LF-only line endings when it is committed, at which point the repository will be fixed.

This should only be a problem if you set the "text" or "eol" attributes in an existing repository, or if someone adds CRLFs to a normalized file using an older version of git.

I'm sorry if I was unclear about Finn Arne's patch: "safe autocrlf" only applies when files are normalized due to core.autocrlf.  If "text" or "eol" is set on a file, the file is normalized to LF-only regardless of whether it contains CRs in the repository.


I think they are symmetric in practice.  While it's possible to get the repository into a state where you will get CRLFs in a text file that should be LF-only, it is both unlikely and easily fixed.
-- 
Eyvind

--
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:
What's cooking extra, Junio C Hamano, (Wed May 19, 7:33 am)
Re: What's cooking extra, A Large Angry SCM, (Wed May 19, 8:12 am)
Re: What's cooking extra, Finn Arne Gangstad, (Wed May 19, 10:06 am)
Re: What's cooking extra, Eyvind Bernhardsen, (Wed May 19, 1:09 pm)
Re: What's cooking extra, Ævar Arnfjörð Bjarmason, (Fri May 21, 9:16 am)
Re: What's cooking extra, Clemens Buchacher, (Sat May 22, 6:09 am)
Re: What's cooking extra, Eyvind Bernhardsen, (Sat May 22, 12:42 pm)
Re: What's cooking extra, René Scharfe, (Sat May 22, 2:24 pm)
[PATCH 3/8] grep: --count over binary, René Scharfe, (Sat May 22, 2:29 pm)
[PATCH 4/8] grep: --name-only over binary, René Scharfe, (Sat May 22, 2:30 pm)
[PATCH 5/8] grep: use memmem() for fixed string search, René Scharfe, (Sat May 22, 2:32 pm)
Re: What's cooking extra, Clemens Buchacher, (Sat May 22, 3:27 pm)
Re: What's cooking extra, Eyvind Bernhardsen, (Sun May 23, 3:36 am)
Re: What's cooking extra, Clemens Buchacher, (Sun May 23, 4:51 am)
Re: What's cooking extra, Eyvind Bernhardsen, (Sun May 23, 5:53 am)
Re: What's cooking extra, Ævar Arnfjörð Bjarmason, (Sun May 23, 6:26 am)
Re: What's cooking extra, Clemens Buchacher, (Mon May 24, 2:49 am)
Re: What's cooking extra, Dmitry Potapov, (Mon May 24, 5:12 am)
Re: What's cooking extra, Erik Faye-Lund, (Mon May 24, 5:22 am)
Re: What's cooking extra, Dmitry Potapov, (Mon May 24, 5:42 am)
Re: What's cooking extra, Dmitry Potapov, (Mon May 24, 5:47 am)
Re: What's cooking extra, Eyvind Bernhardsen, (Mon May 24, 1:45 pm)
Re: What's cooking extra, Clemens Buchacher, (Mon May 24, 1:56 pm)
Re: What's cooking extra, Eyvind Bernhardsen, (Mon May 24, 2:09 pm)
Re: What's cooking extra, Eyvind Bernhardsen, (Mon May 24, 2:11 pm)
Re: What's cooking extra, Clemens Buchacher, (Mon May 24, 3:11 pm)
Re: What's cooking extra, Eyvind Bernhardsen, (Mon May 24, 11:41 pm)
Re: What's cooking extra, Anthony Youngman, (Tue May 25, 1:27 am)
Re: What's cooking extra, Clemens Buchacher, (Tue May 25, 1:33 am)
Re: What's cooking extra, Eyvind Bernhardsen, (Mon Jun 7, 12:55 pm)