Re: [PATCH v2 0/2] checkout -m: recreate conflict labels
On 05/10/2026 15:48, Johannes Sixt wrote:
Show 15 quoted lines
> Am 05.10.26 um 15:24 schrieb Phillip Wood:
>> As "git checkout -m" is recreating the original conflict I wonder
>> if we should remember the conflict style as well so that
>>
>> git -c merge.conflictStyle=diff3 git merge topic
>> git checkout -m <unmerged-path>
>>
>> would recreate diff3 style conflicts, instead of using the default
>> config. I cannot decide if that would be convenient or confusing and
>> am interested to hear what others think.
> > I think it hurts more than it helps. For example, I usually get away
> with the regular conflict markers, but at times I might decide to see
> the diff3 version. Then I could change the conflict marker style with
> > git checkout --conflict=diff3 -m <unmerged-path>
> > It would be disappointing if this were not possible.
I do the same thing. What I'm talking about above is "git checkout -m" using the same conflict style as the command that created the conflicts when the user does not specify a conflict style for the checkout.
git checkout --conflict=<style> ...
and
git -c merge.conflictStyle=<style> checkout -m ...
would continue to work as they do now.
Thanks
Phillip