{"thread":{"id":"18713","subject":"[PATCH] mergetool-lib: make (g)vimdiff workable under Windows","startedAt":"2009-04-04T13:17:54Z","lastAt":"2009-04-05T18:41:03Z","messageCount":4,"participants":["Markus Heidelberg","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"110333","messageId":"200904041517.55890.markus.heidelberg@web.de","threadId":"18713","inReplyTo":null,"subject":"[PATCH] mergetool-lib: make (g)vimdiff workable under Windows","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-04T13:17:54Z","receivedAt":"2009-04-04T13:17:54Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Under Windows vimdiff and gvimdiff are not available as symbolic links,\nbut as batch files vimdiff.bat and gvimdiff.bat. These files weren't\nfound by 'type vimdiff' which led to the following error:\n\n    The merge tool vimdiff is not available as 'vimdiff'\n\nEven if they were found, it wouldn't work to invoke these batch files\nfrom git-mergetool.\n\nTo solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d\ncommand line switch over to them.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nThis patch goes on top of the current difftool/mergetool patches from David.\nThis is 'da/difftool' in the current 'pu' and in addition:\n[PATCH] mergetool-lib: refactor run_mergetool and check_unchanged\n[PATCH] mergetool-lib: specialize opendiff options when in diff mode\n\n git-mergetool--lib.sh |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex b8566b2..6f0e8f7 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -11,6 +11,12 @@ get_merge_tool_path () {\n \tpath=\"$1\"\n \tif test -z \"$2\"; then\n \t\tcase \"$1\" in\n+\t\tvimdiff)\n+\t\t\tpath=vim\n+\t\t\t;;\n+\t\tgvimdiff)\n+\t\t\tpath=gvim\n+\t\t\t;;\n \t\temerge)\n \t\t\tpath=emacs\n \t\t\t;;\n@@ -142,19 +148,19 @@ run_mergetool () {\n \tvimdiff)\n \t\tif merge_mode; then\n \t\t\ttouch \"$BACKUP\"\n-\t\t\t\"$merge_tool_path\" -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t\t\t\"$merge_tool_path\" -d -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t\t\tcheck_unchanged\n \t\telse\n-\t\t\t\"$merge_tool_path\" -c \"wincmd l\" \"$LOCAL\" \"$REMOTE\"\n+\t\t\t\"$merge_tool_path\" -d -c \"wincmd l\" \"$LOCAL\" \"$REMOTE\"\n \t\tfi\n \t\t;;\n \tgvimdiff)\n \t\tif merge_mode; then\n \t\t\ttouch \"$BACKUP\"\n-\t\t\t\"$merge_tool_path\" -c \"wincmd l\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t\t\t\"$merge_tool_path\" -d -c \"wincmd l\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t\t\tcheck_unchanged\n \t\telse\n-\t\t\t\"$merge_tool_path\" -c \"wincmd l\" -f \"$LOCAL\" \"$REMOTE\"\n+\t\t\t\"$merge_tool_path\" -d -c \"wincmd l\" -f \"$LOCAL\" \"$REMOTE\"\n \t\tfi\n \t\t;;\n \txxdiff)\n-- \n1.6.2.2.428.gea44ab\n"},{"id":"110390","messageId":"alpine.DEB.1.00.0904051134210.10279@pacific.mpi-cbg.de","threadId":"18713","inReplyTo":"200904041517.55890.markus.heidelberg@web.de","subject":"Re: [PATCH] mergetool-lib: make (g)vimdiff workable under Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-04-05T09:35:23Z","receivedAt":"2009-04-05T09:35:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nHi,\n\nOn Sat, 4 Apr 2009, Markus Heidelberg wrote:\n\n> Under Windows vimdiff and gvimdiff are not available as symbolic links, \n> but as batch files vimdiff.bat and gvimdiff.bat. These files weren't \n> found by 'type vimdiff' which led to the following error:\n> \n>     The merge tool vimdiff is not available as 'vimdiff'\n> \n> Even if they were found, it wouldn't work to invoke these batch files\n> from git-mergetool.\n> \n> To solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d\n> command line switch over to them.\n> \n> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n> ---\n> \n> This patch goes on top of the current difftool/mergetool patches from David.\n\n,.. which is a pity, because I could have applied them directly to \nmsysGit's 'devel' branch otherwise.\n\nThanks,\nDscho\n"},{"id":"110403","messageId":"200904051232.19939.markus.heidelberg@web.de","threadId":"18713","inReplyTo":"alpine.DEB.1.00.0904051134210.10279@pacific.mpi-cbg.de","subject":"Re: [PATCH] mergetool-lib: make (g)vimdiff workable under Windows","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-05T10:32:19Z","receivedAt":"2009-04-05T10:32:19Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nJohannes Schindelin, 05.04.2009:\n> Hi,\n> \n> On Sat, 4 Apr 2009, Markus Heidelberg wrote:\n> \n> > Under Windows vimdiff and gvimdiff are not available as symbolic links, \n> > but as batch files vimdiff.bat and gvimdiff.bat. These files weren't \n> > found by 'type vimdiff' which led to the following error:\n> > \n> >     The merge tool vimdiff is not available as 'vimdiff'\n> > \n> > Even if they were found, it wouldn't work to invoke these batch files\n> > from git-mergetool.\n> > \n> > To solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d\n> > command line switch over to them.\n> > \n> > Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n> > ---\n> > \n> > This patch goes on top of the current difftool/mergetool patches from David.\n> \n> ,.. which is a pity, because I could have applied them directly to \n> msysGit's 'devel' branch otherwise.\n\nThere is currently a lot of refactoring going on in difftool/mergetool,\nso of course I didn't send this to Junio against 'master'. But if you\nwant I can send it for you based on 'master' (or 4msysgit.git 'devel').\n\nJunio, is this something for maint? I'm not sure, since this problem\nonly occurs on Windows and 'maint' isn't interesting for msysgit ATM.\n\nMarkus\n"},{"id":"110424","messageId":"7v63hjt03k.fsf@gitster.siamese.dyndns.org","threadId":"18713","inReplyTo":"200904051232.19939.markus.heidelberg@web.de","subject":"Re: [msysGit] [PATCH] mergetool-lib: make (g)vimdiff workable under Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-05T18:41:03Z","receivedAt":"2009-04-05T18:41:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> Junio, is this something for maint? I'm not sure, since this problem\n> only occurs on Windows and 'maint' isn't interesting for msysgit ATM.\n\nI am not Dscho (nor J6t) but the last time I asked him about some other\n\"This makes it work better on Windows\" patch, the conclusion was \"only\nWindows has issues and msysgit does not use 'maint'\", which I agreed to be\na sensible answer for an undermanned and still-on bleeding edge project\nlike msysgit.\n\nI don't mind a trivial backport for only mergetool part to the tip of\n'master' (because difftool is not in master) that later makes me deal with\na small merge conflict when the refactoring topic hits master.  Or Dscho\ncan apply such a backport and carry it as a msysgit-only patch until my\n'master' is updated with the refactoring topic (at which point the\ntentative patch needs to be dropped).  Either would work fine with me.\n"}]}