From: David Aguilar <davvid@gmail.com>
To: gitster@pobox.com
Cc: markus.heidelberg@web.de, charles@hashpling.org, git@vger.kernel.org
Subject: [PATCH] mergetool--lib: make (g)vimdiff workable under Windows
Date: Sat, 4 Apr 2009 21:15:23 -0700 [thread overview]
Message-ID: <1238904923-13368-1-git-send-email-davvid@gmail.com> (raw)
From: Markus Heidelberg <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>
---
Markus' last patch rebased.
This patch goes on top of the current difftool/mergetool patches from David.
This is 'da/difftool' in the current 'pu' and in addition:
[PATCH] mergetool-lib: refactor run_mergetool and check_unchanged
[PATCH] mergetool-lib: specialize opendiff options when in diff mode
git-mergetool--lib.sh | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 268485a..3d3edda 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -12,6 +12,12 @@ translate_merge_tool_path () {
echo "$2"
else
case "$1" in
+ vimdiff)
+ path=vim
+ ;;
+ gvimdiff)
+ path=gvim
+ ;;
emerge)
path=emacs
;;
@@ -146,19 +152,19 @@ run_merge_tool () {
vimdiff)
if merge_mode; then
touch "$BACKUP"
- "$merge_tool_path" -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
+ "$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$MERGED" "$REMOTE"
check_unchanged
else
- "$merge_tool_path" -c "wincmd l" "$LOCAL" "$REMOTE"
+ "$merge_tool_path" -d -c "wincmd l" "$LOCAL" "$REMOTE"
fi
;;
gvimdiff)
if merge_mode; then
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
else
- "$merge_tool_path" -c "wincmd l" -f "$LOCAL" "$REMOTE"
+ "$merge_tool_path" -d -c "wincmd l" -f "$LOCAL" "$REMOTE"
fi
;;
xxdiff)
--
1.6.2.1.469.gdffc1
reply other threads:[~2009-04-05 4:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1238904923-13368-1-git-send-email-davvid@gmail.com \
--to=davvid@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=markus.heidelberg@web.de \
/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;
as well as URLs for NNTP newsgroup(s).