In some languages, especially configuration files, there are special cases which are easy to auto-merge.
For example a Python requirements.txt file can have:
<<<<<<< HEAD
numpy==1.4
git+https://github.com/foo/bar.git@BBB
||||||| parent of ...
numpy==1.4
git+https://github.com/foo/bar.git@AAA
=======
numpy==2.0
git+https://github.com/foo/bar.git@AAA
>>>>>>> 10ccf9c (feat: updated cztwrap that includes rfft)
We can match the first lines by them all starting with numpy== and thus splitting them to a separate conflict, and then both of the conflicts become trivial.
Other cases:
- Imports in various languages (but not C/C++
#includes whose order matter!)
- Haskell
LANGUAGE pragmas
newtype in base turning into data in both A and B should split the conflict on its line
- Split function conflicts on type declaration, LHS, & RHS
In some languages, especially configuration files, there are special cases which are easy to auto-merge.
For example a Python
requirements.txtfile can have:We can match the first lines by them all starting with
numpy==and thus splitting them to a separate conflict, and then both of the conflicts become trivial.Other cases:
#includes whose order matter!)LANGUAGEpragmasnewtypein base turning intodatain both A and B should split the conflict on its line