-
Notifications
You must be signed in to change notification settings - Fork 395
Mergiraf
Scott Taylor edited this page Feb 8, 2025
·
5 revisions
Mergiraf is a "syntax-aware git merge driver for a growing collection of programming languages and file formats".
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", "-l", "$marker_length", "--fast"]
merge-conflict-exit-codes = [1]
Currently, the --fast
flag often gives the best results because the structural merge algorithm doesn't always maintain comments and spacing in the merge output (even parts without conflicts), but you can remove it if you want to use a full structural merge. Older versions of jj
or Mergiraf may not support the -l $marker_length
flag, so it may need to be removed if you are not using the latest versions of both tools.