Web lists-archives.com

Re: Line ending normalization doesn't work as expected

Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> I suspect what we are dancing around is the need for some command like
> 	git checkout --renormalize .
> which would shorten the sequence to
> 	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 ." ;-)