From: Markus Heidelberg <markus.heidelberg@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, msysgit@googlegroups.com,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
David Aguilar <davvid@gmail.com>,
Charles Bailey <charles@hashpling.org>
Subject: [PATCH 2/3] git-mergetool/difftool: make (g)vimdiff workable under Windows
Date: Sun, 5 Apr 2009 14:42:57 +0200 [thread overview]
Message-ID: <200904051442.58155.markus.heidelberg@web.de> (raw)
In-Reply-To: <200904051440.33154.markus.heidelberg@web.de>
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>
---
contrib/difftool/git-difftool-helper | 10 ++++++++--
git-mergetool.sh | 10 ++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper
index 9c0a134..e481913 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
;;
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 87fa88a..6e611e9 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -214,12 +214,12 @@ merge_file () {
;;
vimdiff)
touch "$BACKUP"
- "$merge_tool_path" -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
+ "$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
check_unchanged
;;
gvimdiff)
touch "$BACKUP"
- "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$MERGED" "$REMOTE"
+ "$merge_tool_path" -d -c "wincmd l" -f "$LOCAL" "$MERGED" "$REMOTE"
check_unchanged
;;
xxdiff)
@@ -359,6 +359,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
;;
--
1.6.2.2.460.g49e5c
next prev parent reply other threads:[~2009-04-05 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 12:40 [PATCH 0/3] git-mergetool/difftool: TortoiseMerge and (g)vimdiff for Windows Markus Heidelberg
2009-04-05 12:42 ` [PATCH 1/3] doc/merge-config: list ecmerge as a built-in merge tool Markus Heidelberg
2009-04-05 12:42 ` Markus Heidelberg [this message]
2009-04-05 12:43 ` [PATCH 3/3] git-mergetool: add new merge tool TortoiseMerge Markus Heidelberg
2009-04-05 13:52 ` [PATCH 0/3] git-mergetool/difftool: TortoiseMerge and (g)vimdiff for Windows Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200904051442.58155.markus.heidelberg@web.de \
--to=markus.heidelberg@web.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=charles@hashpling.org \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=msysgit@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox