Subject: Re: [PATCH v2] convert: clarify line ending conversion warning

From: Junio C Hamano <[email-masked]>
Date: Wed, 06 Apr 2022 12:45:46 -0700

Tao Klerks <[email-masked]> writes:

> On Wed, Apr 6, 2022 at 8:04 PM Torsten Bögershausen <[email-masked]> wrote:
>
>> May be we can use "updates" instead of "touches" ?
>>
>> "In '%s', CRLF will be replaced by LF the next time Git updates it"
>
> Makes sense to me.
>
>>
>> Or may be
>>
>> "In '%s', CRLF will be replaced by LF the next time a `git checkout` updates it"
>>
>
> I believe we should stay away from the word "checkout" because it's
> neither accurate nor clear, for at least a couple of reasons:
> 1. We have long, in principle, been promoting the use of "git switch",
> and it's not obvious in a message like this one that this is
> considered to be equivalent.

It is not an equivalent.  "switch" is a strict subset of "checkout"
and branch switching is not the only case that would correct the
line ending on such a file.  Checking the contents out of the index
or a named commit with "git checkout -- path" would also fix the
line endings.

> 2. Files can be touched/updated by other commands/processes, like "git
> pull" (and "rebase", and probably others I can't think of)

Yes.