Skip to content

Commit b0edfbc

Browse files
committed
use difftool instead of mergetool
1 parent bdc8d9a commit b0edfbc

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

lib/thor/shell/basic.rb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -377,21 +377,7 @@ def merge(destination, content) #:nodoc:
377377
end
378378

379379
def merge_tool #:nodoc:
380-
@merge_tool ||= ENV["THOR_MERGE"] || git_merge_tool
381-
end
382-
383-
def git_merge_tool
384-
tool = `git config merge.tool`.strip
385-
return "" if tool.empty?
386-
387-
custom = `git config --get mergetool.#{tool}.cmd`.strip
388-
return custom unless custom.empty?
389-
390-
return tool if system("command -v #{Shellwords.escape(tool)} > /dev/null 2>&1")
391-
392-
"git mergetool --no-prompt --tool=#{tool}"
393-
rescue
394-
""
380+
@merge_tool ||= ENV["THOR_MERGE"] || "git difftool --no-index"
395381
end
396382
end
397383
end

0 commit comments

Comments
 (0)