Re: Line ending normalization doesn't work as expected

2 messages, 2 authors, 2018-02-15 · open the first message on its own page

Re: Line ending normalization doesn't work as expected

From: Junio C Hamano <hidden>
Date: 2018-02-15 19:16:46

Robert Dailey [off-list ref] writes:
On Tue, Oct 3, 2017 at 9:00 PM, Junio C Hamano [off-list ref] wrote:
quoted
Torsten Bögershausen [off-list ref] writes:
quoted
quoted
$ git rm -r --cached . && git add .
(Both should work)

To be honest, from the documentation, I can't figure out the difference between
$ git read-tree --empty
and
$ git rm -r --cached .

Does anybody remember the discussion, why we ended up with read-tree ?
...
Sorry to bring this old thread back to life, but I did notice that
this causes file modes to reset back to 644 (from 755) on Windows
version of Git. Is there a way to `$ git read-tree --empty && git add
.` without mucking with file permissions?
I think the message you are referring to is a tangent that discusses
how it was done in the old world, with issues that come from the
fact that with such an approach the paths are first removed from the
index and then added afresh to the index, which can lose cases and
executable bits when working on a filesystem that does not retain
enough information.

The way in the new world is to use "add --renormalize" which was
added at 9472935d ("add: introduce "--renormalize"", 2017-11-16), I
think.

Re: Line ending normalization doesn't work as expected

From: Robert Dailey <hidden>
Date: 2018-02-15 21:47:08

On Thu, Feb 15, 2018 at 1:16 PM, Junio C Hamano [off-list ref] wrote:
I think the message you are referring to is a tangent that discusses
how it was done in the old world, with issues that come from the
fact that with such an approach the paths are first removed from the
index and then added afresh to the index, which can lose cases and
executable bits when working on a filesystem that does not retain
enough information.

The way in the new world is to use "add --renormalize" which was
added at 9472935d ("add: introduce "--renormalize"", 2017-11-16), I
think.
Oh I didn't realize someone actually did it. If so, that's awesome.
Thanks Junio!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help