{"thread":{"id":"18729","subject":"[PATCH] mergetool--lib: make (g)vimdiff workable under Windows","startedAt":"2009-04-05T04:15:23Z","lastAt":"2009-04-05T04:15:23Z","messageCount":1,"participants":["David Aguilar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"110382","messageId":"1238904923-13368-1-git-send-email-davvid@gmail.com","threadId":"18729","inReplyTo":null,"subject":"[PATCH] mergetool--lib: make (g)vimdiff workable under Windows","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-05T04:15:23Z","receivedAt":"2009-04-05T04:15:23Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\n\nUnder 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\nThe 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\nMarkus' last patch rebased.\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\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 268485a..3d3edda 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -12,6 +12,12 @@ translate_merge_tool_path () {\n \t\techo \"$2\"\n \telse\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@@ -146,19 +152,19 @@ run_merge_tool () {\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.1.469.gdffc1\n"}]}