File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -272,8 +272,25 @@ proc merge_resolve_tool2 {} {
272
272
}
273
273
}
274
274
default {
275
- error_popup [mc " Unsupported merge tool '%s'" $tool ]
276
- return
275
+ set tool_cmd [get_config mergetool.$tool .cmd]
276
+ if {$tool_cmd ne {}} {
277
+ if {([string first {[} $tool_cmd ] != -1) || ([string first {]} $tool_cmd ] != -1)} {
278
+ error_popup [mc " Unable to process square brackets in \" mergetool.%s.cmd\" configuration option.
279
+
280
+ Please remove the square brackets." $tool ]
281
+ return
282
+ } else {
283
+ set cmdline {}
284
+ foreach command_part $tool_cmd {
285
+ lappend cmdline [subst -nobackslashes -nocommands $command_part ]
286
+ }
287
+ }
288
+ } else {
289
+ error_popup [mc " Unsupported merge tool '%s'.
290
+
291
+ To use this tool, configure \" mergetool.%s.cmd\" as shown in the git-config manual page." $tool $tool ]
292
+ return
293
+ }
277
294
}
278
295
}
279
296
You can’t perform that action at this time.
0 commit comments