2

I developed a Python library for merging large numbers of XML files in a very specific way. These XML files are split up and altered by multiple users in my group and it would be much easier to put everything into a Git repo and have git-merge manage everything via my Python code.

It seems that implementing my code for git-mergetool is possible, but I would have to write my own code to manage the conflict returns for the internal git-merge (i.e. parse the >>>>>>> <<<<<<< ======= identifiers), which would be more time consuming.

So, is there a way to have Git's merge command automatically use my Python code instead of its internal git-merge?

Michael M.
  • 23
  • 3

1 Answers1

1

You can implement a custom merge driver that's used for certain filetypes instead of Git's default merge driver.

Some related StackOverflow questions:

Community
  • 1
  • 1
Magnus Bäck
  • 11,381
  • 3
  • 47
  • 59
  • The OP might also find this external link useful: http://vlists.pepperfish.net/pipermail/baserock-dev-baserock.org/2012-September/000658.html – torek Jan 15 '14 at 22:54