Re: Line ending normalization doesn't work as expected
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 5, 2017, 01:46 UTC
- Message-ID
- <20171005014651.GT19555@aiede.mtv.corp.google.com>
- In-Reply-To
- <xmqqbmlm9y94.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 19 quoted lines
>> 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