That doesn't help when the file is a binary and nobody has written a tool to merge it. How do you merge a picture?
Re:Developing open-source FPGA tools
by naikrovek on Wednesday November 13, 2019 @09:08PM
(#21532119)
You're not replying to me, but I imagine you'd decode both images to an uncompressed format and diff them visually, optionally with a way to highlight pixels that differ between the two.
Binary file types that you can't view in some way would be challenging.
If you want to invoke different tools for different types of files, you can either handle this in your script, or you can explicitly pass the --tool flag in cases where you want to use a non-default tool.
Writing the wrapper script is generally pretty straightforward - the only "gotchas" are making sure the file patterns can be handled by your merge tool, and making sure you write the result to $MERGED. Sometimes you need to have a "clean-up" step in your script that copies the merge tool output to $MERGED and maybe deletes tmp files that were created.
[1] https://git-scm.com/docs/git-mergetool