-
Notifications
You must be signed in to change notification settings - Fork 353
Mergiraf
Scott Taylor edited this page Dec 10, 2024
·
4 revisions
Mergiraf is a "syntax-aware git merge driver for a growing collection of programming languages and file formats", and it can be used as a merge tool with jj
version 0.24.0 or higher and Mergiraf version 0.4.0 or higher.
To configure Mergiraf as a merge tool for jj resolve
, add the following snippet to your jj
configuration:
[merge-tools.mergiraf]
program = "mergiraf"
merge-args = ["merge", "$base", "$left", "$right", "-o", "$output", "--fast"]
merge-conflict-exit-codes = [1]
conflict-marker-style = "git"
Currently, the --fast
flag often gives the best results, because the structural merge algorithm doesn't always maintain comments and spacing in the result of the file (even parts without conflicts). It may also be possible to use mergiraf solve
instead of mergiraf merge
.