I've got a custom git merge driver configured for pom.xml (Maven) files.
The configuration:
The .gitattributes file:
pom.xml merge=pommerge
And the .gitconfig file:
[merge "pommerge"]
name = A custom merge driver for Maven's pom.xml
driver = mergepom.py %O %A %B
This works great for resolving conflicts in this kind of file. Unfortunately this doesn't solve all or problems for pom.xml files.. This driver is only called while merging if and only if the pom.xml is changed in both the main branch (so, the branch in which we call 'git merge otherbranch') and the branche we'd like to merge ('otherbranch').
We'd like to always use our merge driver for pom files, even if the pom file is only changed in 1 branch and can be be merged without conflicts.
Is there a way to force our custom 'pommerge' driver in this situation?
Update I've tried almost anything, but without luck. I even checkout out the git source code and added more logging to the code and installed/MAKE'd it to check if I could find out if there was a specific extension point I could use somehow. But the code is pretty hard to understand in which cases which path in the code is followed, so this effort produced more frustations than solutions;)..
The only way I can make it to work, which is not a solution, is to change the file at both ends (branches), before merging.. But this is not very user friendly
I still hope someone comes up with a genius solution or clue which helps me get a little bit further with this challenge.
Thanks you all for your time!