Debian Codegraph @

cli/src/config/merge_tools.toml

raw
1 [merge-tools.diffedit3]
2 program="diffedit3"
3 # 17376 is a verified random number, as in https://xkcd.com/221/ :). I am trying
4 # to avoid 8000 or 8080 in case those, more commonly used, port numbers are used
5 # for something else.
6 #
7 # We use a random port as a fallback if all 5 of the preferred port numbers are
8 # busy.
9 edit-args = ["$left", "$right", "$output", "--port", "17376-17380", "--port", "0"]
10 # Not the best diff viewer, but functional. It's possible to hide the 3rd pane in the UI.
11 diff-args = ["$left", "$right", "--port", "17376-17380", "--port", "0"]
12
13 [merge-tools.diffedit3-ssh]
14 program="diffedit3"
15 # See comments for `diffedit3` above.
16 #
17 # Unlike `diffedit3`, `diffedit3-ssh` does NOT use a random port as a fallback
18 # since we recommend that the user configure SSH to forward these 5 ports
19 edit-args = ["$left", "$right", "$output", "--port", "17376-17380", "--no-browser"]
20 diff-args = ["$left", "$right", "--port", "17376-17380", "--no-browser"]
21
22 [merge-tools.difft]
23 diff-args = ["--color=always", "--width=$width", "$left", "$right"]
24 edit-args = [] # Non-interactive diff formatter
25
26 [merge-tools.kdiff3]
27 # --merge to open output pane, CreateBakFiles=0 to not include backup files in commit
28 edit-args = ["--merge", "--cs", "CreateBakFiles=0", "$left", "$right"]
29 merge-args = ["$base", "$left", "$right", "-o", "$output", "--auto"]
30
31 [merge-tools.meld]
32 edit-args = ["$left", "$right"]
33 merge-args = ["$left", "$base", "$right", "-o", "$output", "--auto-merge"]
34
35 [merge-tools.meld-3]
36 program="meld"
37 diff-args = ["$left", "$right"] # Same as the default value
38 # If using this as a template, note that `$output` is repeated twice below
39 edit-args = ["$left", "$output", "$right", "-o", "$output"]
40
41 [merge-tools.mergiraf]
42 # Currently, the --fast flag often gives the best results because the structural merge
43 # algorithm doesn't always maintain comments and spacing in the merge output
44 # (even parts without conflicts), but you can remove it if you want to use a full structural merge.
45 program = "mergiraf"
46 merge-args = ["merge", "$base", "$left", "$right", "-o", "$output", "-l", "$marker_length", "-p", "$path", "--fast"]
47 merge-conflict-exit-codes = [1]
48 # Non-interactive merge tool
49 edit-args = []
50 diff-args = []
51
52 [merge-tools.smerge]
53 merge-args = ["mergetool", "$base", "$left", "$right", "-o", "$output"]
54 conflict-marker-style = "git"
55 # Does not support diff editing as of this writing. See also
56 # https://github.com/sublimehq/sublime_merge/issues/1939
57 # https://www.sublimemerge.com/docs/command_line
58 edit-args = []
59 diff-args = []
60
61 [merge-tools.vimdiff]
62 program = "vim"
63 # `-d` enables diff mode. `-f` makes vim run in foreground even if it starts a GUI.
64 # The other options make sure that only the output file can be modified.
65 merge-args = ["-f", "-d", "$output", "-M", "$left", "$base", "$right",
66 "-c", "wincmd J", "-c", "set modifiable", "-c", "set write",
67 "-c", "/<<<<<</+2"]
68 merge-tool-edits-conflict-markers = true
69 # Using vimdiff as a diff editor is possible but not recommended. For
70 # instructions on configuring the DirDiff Vim plugin for a better experience,
71 # see https://gist.github.com/ilyagr/5d6339fb7dac5e7ab06fe1561ec62d45
72 edit-args = ["-f", "-d", "$left", "$right"]
73 diff-args = [] # Corrupts terminal state, non-functional
74
75 # if you change the settings for vscode, please do the same for vscodium
76 [merge-tools.vscode]
77 program = "code"
78 merge-args = ["--wait", "--merge", "$left", "$right", "$base", "$output"]
79 # VS Code reads the output file and behaves better if it's prepopulated with conflict
80 # markers. Unfortunately, it does not seem to be able to output conflict markers when
81 # the user only resolves some of the conflicts.
82 merge-tool-edits-conflict-markers = true
83 # VS Code prefers Git-style conflict markers
84 conflict-marker-style = "git"
85 # Not recommended, but functional. Without `--wait`, the behavior may be more
86 # convenient, but is also more confusing and brittle (all files get deleted).
87 # TODO: We could consider a "file-by-file-keep-files" invocation mode to make it
88 # work better.
89 diff-args=["--diff", "$left", "$right", "--wait"]
90 diff-invocation-mode="file-by-file"
91 # `code --diff` does not support dir-diff
92 edit-args = []
93
94 # free/libre distribution of vscode, functionally more or less the same
95 [merge-tools.vscodium]
96 program = "codium"
97 merge-args = ["--wait", "--merge", "$left", "$right", "$base", "$output"]
98 # See notes for vscode above
99 merge-tool-edits-conflict-markers = true
100 conflict-marker-style = "git"
101 diff-args=["--diff", "$left", "$right", "--wait"]
102 diff-invocation-mode="file-by-file"
103 edit-args = []