Thread (9 messages) 9 messages, 4 authors, 2016-06-15

Re: core.autocrlf considered half-assed

From: Dmitry Potapov <hidden>
Date: 2016-06-15 22:48:24

On Tue, Mar 09, 2010 at 10:29:20AM +0100, Johannes Schindelin wrote:
That is just papering over the real culprit: Git checks something out. 
This should be clean. But then Git says it is not.
We have two filters: from-git-to-worktree and from-worktree-to-git. If
those conversions are inconsistent for whatever reason, it is not going
to be well even if we found a way to solve this not-being-clean-after-
checkout problem.

One possible approach is to mark all files that had CRLF conversion
during checkout and apply the opposite conversion only to them. But what
about newly added files? Wouldn't this lead that to the situation where
newly added files will have the incorrect ending?

IMHO, this not clean after checkout repo demonstrates that you have the
incorrectly crlf configuration in it. So, you probably should correct
.gitattributes (or even to disable autocrlf in it if this repository is
not intended to be used with autocrlf=true). Either way, your current
settings are incorrect. It is better to fix it than try to hide it!


Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help