0

When git-merging two branches which produces two merge conflicts located in non-coherent lines I wonder why the output produced by auto-merge only shows one conflict containing multiple equivalent lines.

The following shows the output after merging:

Hello
World
that
<<<<<<< HEAD
was
a
goddamn
nasty
file.
=======
will
be
a
goddamn
nasty
merge.
>>>>>>> remote

I would expect something like this:

Hello
World
that
<<<<<<< HEAD
was
=======
will
be
>>>>>>> remote
a
goddamn
nasty
<<<<<<< HEAD
file.
=======
merge.
>>>>>>> remote
Lukas
  • 314
  • 3
  • 14

1 Answers1

0

Ok I found it out myself: Adding one equal line in both branches produces this:

Hello
World
that
<<<<<<< HEAD
was
=======
will
be
>>>>>>> remote
a
long
goddamn
nasty
<<<<<<< HEAD
file.
=======
merge.
>>>>>>> remote

So I assume all conflicts are bound together if there is not at least a space of 4 un-conflicting lines between a conflict pair.

Lukas
  • 314
  • 3
  • 14