I'm trying to git merge master
from the command line.
There is a good number of conflicts. So far so good.
However, the conflict markers are placed incorrectly, which makes manual conflict resolution extra tedious.
I can't expose the code here, but it basically looks like this:
# some correctly identified conflicts followed by
# some code without conflicts:
dummy code 1
dummy code 2
<<<<<<<< HEAD
some lines that don't come after dummy code 2 in HEAD # why??
========
lines that come after dummy code 2 in master # this is OK
dummy code 3
>>>>>>>> master
lines that come after dummy code 3 in master, but not after dummy code 2 in HEAD # i.e. there's a conflict here that git failed to identify
Whatever algo git merge
uses to place those conflict markers, I would expect that removing everything between =======
and >>>>>> master
should basically restore the HEAD
version of the file. Which is not the case here.
I couldn't find much info about others encountering a similar issue (only this old question from 2016), just wondering what the cause of this might be?