merge-tool command manages your external merge tools. Diversion runs them when you merge, update, or revert with --conflict_resolution merge-tool. For how the flow works and ready-to-use examples, see the External Merge Tools guide.
Your tools are saved for your user on this computer, not in the repository. If more than one tool matches a file, the first tool in the list wins.
list
Show your tools, in the order Diversion matches them.dv merge-tool -l does the same thing. For each tool, it prints the name, the pattern, whether the exit code is trusted, and the command. With no tools, it prints No merge tools configured.
add
Add a tool.--name is a unique name for the tool. If a tool with this name already exists, Diversion replaces it and keeps its place in the list. A new tool goes to the end of the list.
--pattern is a regular expression matched against the file path, for example \.prefab$. See file patterns.
--cmd is the command line to run. It must include $RESULT, the file where the tool writes the result. You can also use $ANCESTOR, $CURRENT, and $INCOMING. See command placeholders.
[--no-trust-exit-code] ignores the exit code of the tool and checks the merged file instead. Use it for visual tools that exit with 0 even when you close them without saving.
On Mac and Linux, put --pattern and --cmd in single quotes so your shell does not change $ and other special characters.
Example:

