Show 21 quoted lines
>> [1] Detailed semantics: for each path listed by "git diff --name-only
>> HEAD <commit>":
>>
>> * if the worktree, index, and HEAD match, make the index and worktree
>> match <commit>.
>>
>> * otherwise, if it is "not easy" to keep local changes, error out.
>> We are not going to do a three-way merge. That is,
>>
>> - if the index matches neither HEAD nor <commit>, error out;
>> - if the index matches HEAD but not the worktree, error out.
>>
>> * otherwise, it is "easy", so keep local changes.
>>
>> - if the index already matches <commit>, leave the index and
>> worktree alone.
>> - if the index and worktree match HEAD, make them match the
>> <commit> instead.
>
> The latter item in the last "otherwise" is the same as the first "if all
> match, move to the one from the named commit", isn't it?