diff options
author | Markus Heidelberg <markus.heidelberg@web.de> | 2009-04-06 01:31:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-07 22:19:55 -0700 |
commit | bad42732008cb0c1e77046d716e4446b1545d4d0 (patch) | |
tree | 38e7184d5e448849061b1ae820800300814b46e1 /contrib | |
parent | da81688cc5639c9c482a89a4b732737f7aa0d61d (diff) | |
download | git-bad42732008cb0c1e77046d716e4446b1545d4d0.tar.gz git-bad42732008cb0c1e77046d716e4446b1545d4d0.tar.xz |
git-mergetool/difftool: make (g)vimdiff workable under Windows
Under Windows vimdiff and gvimdiff are not available as symbolic links,
but as batch files vimdiff.bat and gvimdiff.bat. These files weren't
found by 'type vimdiff' which led to the following error:
The merge tool vimdiff is not available as 'vimdiff'
Even if they were found, it wouldn't work to invoke these batch files
from git-mergetool.
To solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d
command line switch over to them.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/difftool/git-difftool-helper | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper index 9c0a13452..e481913c9 100755 --- a/contrib/difftool/git-difftool-helper +++ b/contrib/difftool/git-difftool-helper @@ -86,11 +86,11 @@ launch_merge_tool () { ;; vimdiff) - "$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE" + "$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$REMOTE" ;; gvimdiff) - "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE" + "$merge_tool_path" -d -c "wincmd l" -f "$LOCAL" "$REMOTE" ;; xxdiff) @@ -160,6 +160,12 @@ init_merge_tool_path() { merge_tool_path=$(git config mergetool."$1".path) if test -z "$merge_tool_path"; then case "$1" in + vimdiff) + merge_tool_path=vim + ;; + gvimdiff) + merge_tool_path=gvim + ;; emerge) merge_tool_path=emacs ;; |