diff options
author | Michael Schindler <michael@compressconsult.com> | 2021-06-07 20:18:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-08 10:26:16 +0900 |
commit | 47eb4c689073eddc082007255564e1d3e142b727 (patch) | |
tree | 0ab31aed011e055898e445a1a34aeb95b1bd1b0f /mergetools | |
parent | 48bf2fa8bad054d66bd79c6ba903c89c704201f7 (diff) | |
download | git-47eb4c689073eddc082007255564e1d3e142b727.tar.gz |
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 <gitster@pobox.com>
Diffstat (limited to 'mergetools')
-rw-r--r-- | mergetools/kdiff3 | 9 |
1 files changed, 9 insertions, 0 deletions
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 +} |