From: Jonathan Nieder Date: Thu, 05 Oct 2017 01:46:51 GMT Subject: Re: Line ending normalization doesn't work as expected Message-ID: <20171005014651.GT19555@aiede.mtv.corp.google.com> In-Reply-To: Junio C Hamano wrote: > Jonathan Nieder writes: >> git checkout --renormalize . >> git status; # Show files that will be normalized >> git commit; # Commit the result >> >> What do you think? Would you be interested in writing a patch for it? >> ("No" is as always an acceptable answer.) > > I actually think what is being requested is the opposite, i.e. "the > object registered in the index have wrong line endings, and the > safe-crlf is getting in the way to prevent me from correcting by > hashing the working tree contents again to register contents with > corrected line endings, even with 'git add .'". > > So I would understand if your suggestion were for > > git checkin --renormalize . > > but not "git checkout". And it probably is more familiar to lay > people if we spelled that as "git add --renormalize ." ;-) Good catch. You understood correctly --- "git add --renormalize" is the feature that I think is being hinted at here. Thanks, Jonathan