From 47eb4c689073eddc082007255564e1d3e142b727 Mon Sep 17 00:00:00 2001 From: Michael Schindler Date: Mon, 7 Jun 2021 20:18:33 +0000 Subject: [PATCH] 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 --- mergetools/kdiff3 | 9 +++++++++ 1 file changed, 9 insertions(+) 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 +}