* [PATCH] mergetool-lib: make (g)vimdiff workable under Windows
@ 2009-04-04 13:17 Markus Heidelberg
2009-04-05 9:35 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Markus Heidelberg @ 2009-04-04 13:17 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, David Aguilar, Charles Bailey, msysgit
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>
---
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 b8566b2..6f0e8f7 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -11,6 +11,12 @@ get_merge_tool_path () {
path="$1"
if test -z "$2"; then
case "$1" in
+ vimdiff)
+ path=vim
+ ;;
+ gvimdiff)
+ path=gvim
+ ;;
emerge)
path=emacs
;;
@@ -142,19 +148,19 @@ run_mergetool () {
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.2.428.gea44ab
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mergetool-lib: make (g)vimdiff workable under Windows
2009-04-04 13:17 [PATCH] mergetool-lib: make (g)vimdiff workable under Windows Markus Heidelberg
@ 2009-04-05 9:35 ` Johannes Schindelin
2009-04-05 10:32 ` Markus Heidelberg
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2009-04-05 9:35 UTC (permalink / raw)
To: Markus Heidelberg
Cc: Junio C Hamano, git, David Aguilar, Charles Bailey, msysgit
Hi,
On Sat, 4 Apr 2009, Markus Heidelberg wrote:
> 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>
> ---
>
> This patch goes on top of the current difftool/mergetool patches from David.
,.. which is a pity, because I could have applied them directly to
msysGit's 'devel' branch otherwise.
Thanks,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mergetool-lib: make (g)vimdiff workable under Windows
2009-04-05 9:35 ` Johannes Schindelin
@ 2009-04-05 10:32 ` Markus Heidelberg
2009-04-05 18:41 ` [msysGit] " Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Markus Heidelberg @ 2009-04-05 10:32 UTC (permalink / raw)
To: Johannes Schindelin, Junio C Hamano
Cc: git, David Aguilar, Charles Bailey, msysgit
Johannes Schindelin, 05.04.2009:
> Hi,
>
> On Sat, 4 Apr 2009, Markus Heidelberg wrote:
>
> > 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>
> > ---
> >
> > This patch goes on top of the current difftool/mergetool patches from David.
>
> ,.. which is a pity, because I could have applied them directly to
> msysGit's 'devel' branch otherwise.
There is currently a lot of refactoring going on in difftool/mergetool,
so of course I didn't send this to Junio against 'master'. But if you
want I can send it for you based on 'master' (or 4msysgit.git 'devel').
Junio, is this something for maint? I'm not sure, since this problem
only occurs on Windows and 'maint' isn't interesting for msysgit ATM.
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [msysGit] [PATCH] mergetool-lib: make (g)vimdiff workable under Windows
2009-04-05 10:32 ` Markus Heidelberg
@ 2009-04-05 18:41 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-04-05 18:41 UTC (permalink / raw)
To: markus.heidelberg
Cc: Johannes Schindelin, git, David Aguilar, Charles Bailey, msysgit
Markus Heidelberg <markus.heidelberg@web.de> writes:
> Junio, is this something for maint? I'm not sure, since this problem
> only occurs on Windows and 'maint' isn't interesting for msysgit ATM.
I am not Dscho (nor J6t) but the last time I asked him about some other
"This makes it work better on Windows" patch, the conclusion was "only
Windows has issues and msysgit does not use 'maint'", which I agreed to be
a sensible answer for an undermanned and still-on bleeding edge project
like msysgit.
I don't mind a trivial backport for only mergetool part to the tip of
'master' (because difftool is not in master) that later makes me deal with
a small merge conflict when the refactoring topic hits master. Or Dscho
can apply such a backport and carry it as a msysgit-only patch until my
'master' is updated with the refactoring topic (at which point the
tentative patch needs to be dropped). Either would work fine with me.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-05 18:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-04 13:17 [PATCH] mergetool-lib: make (g)vimdiff workable under Windows Markus Heidelberg
2009-04-05 9:35 ` Johannes Schindelin
2009-04-05 10:32 ` Markus Heidelberg
2009-04-05 18:41 ` [msysGit] " Junio C Hamano
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).