From: Michael Schindler Date: Mon, 7 Jun 2021 20:18:33 +0000 (+0000) Subject: mergetools/kdiff3: make kdiff3 work on Windows too X-Git-Tag: v2.33.0-rc0~78^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=47eb4c689073eddc082007255564e1d3e142b727;p=thirdparty%2Fgit.git mergetools/kdiff3: make kdiff3 work on Windows too The native kdiff3 mergetool is not found by git mergetool on Windows. The message "The merge tool kdiff3 is not available as 'kdiff3'" is displayed. Just like we translate the name of the binary and look for it on the search path for WinMerge, do the same for kdiff3 to find it. Signed-off-by: Michael Schindler michael@compressconsult.com Signed-off-by: Junio C Hamano --- diff --git a/mergetools/kdiff3 b/mergetools/kdiff3 index 0264ed5b20..520cb914a1 100644 --- a/mergetools/kdiff3 +++ b/mergetools/kdiff3 @@ -25,3 +25,12 @@ merge_cmd () { exit_code_trustable () { true } + +translate_merge_tool_path() { + if type kdiff3 >/dev/null 2>/dev/null + then + echo kdiff3 + else + mergetool_find_win32_cmd "kdiff3.exe" "Kdiff3" + fi +}