{"thread":{"id":"18734","subject":"[PATCH 0/3] git-mergetool/difftool: TortoiseMerge and (g)vimdiff for Windows","startedAt":"2009-04-05T12:40:32Z","lastAt":"2009-04-05T13:52:03Z","messageCount":5,"participants":["Markus Heidelberg","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"110407","messageId":"200904051440.33154.markus.heidelberg@web.de","threadId":"18734","inReplyTo":null,"subject":"[PATCH 0/3] git-mergetool/difftool: TortoiseMerge and (g)vimdiff for Windows","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-05T12:40:32Z","receivedAt":"2009-04-05T12:40:32Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Patches 2/3 and 3/3 are already in 'da/difftool' in 'pu'. This series is\nbased on 'master', now they can be applied to 4msysgit.git.\n'da/difftool' should be recreated anyway.\n\nMarkus Heidelberg (3):\n  doc/merge-config: list ecmerge as a valid merge tool\n  git-mergetool/difftool: make (g)vimdiff workable under Windows\n  git-mergetool: add new merge tool TortoiseMerge\n\n Documentation/git-mergetool.txt      |    3 ++-\n Documentation/merge-config.txt       |    3 ++-\n contrib/difftool/git-difftool-helper |   10 ++++++++--\n git-mergetool.sh                     |   26 +++++++++++++++++++++-----\n 4 files changed, 33 insertions(+), 9 deletions(-)\n"},{"id":"110408","messageId":"200904051442.27683.markus.heidelberg@web.de","threadId":"18734","inReplyTo":"200904051440.33154.markus.heidelberg@web.de","subject":"[PATCH 1/3] doc/merge-config: list ecmerge as a built-in merge tool","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-05T12:42:27Z","receivedAt":"2009-04-05T12:42:27Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n Documentation/merge-config.txt |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt\nindex 1ff08ff..9c44af8 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -22,7 +22,8 @@ merge.stat::\n merge.tool::\n \tControls which merge resolution program is used by\n \tlinkgit:git-mergetool[1].  Valid built-in values are: \"kdiff3\",\n-\t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\", and\n+\t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\",\n+\t\"ecmerge\" and\n \t\"opendiff\".  Any other value is treated is custom merge tool\n \tand there must be a corresponding mergetool.<tool>.cmd option.\n \n-- \n1.6.2.2.460.g49e5c\n"},{"id":"110409","messageId":"200904051442.58155.markus.heidelberg@web.de","threadId":"18734","inReplyTo":"200904051440.33154.markus.heidelberg@web.de","subject":"[PATCH 2/3] git-mergetool/difftool: make (g)vimdiff workable under Windows","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-05T12:42:57Z","receivedAt":"2009-04-05T12:42:57Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\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\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 contrib/difftool/git-difftool-helper |   10 ++++++++--\n git-mergetool.sh                     |   10 ++++++++--\n 2 files changed, 16 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper\nindex 9c0a134..e481913 100755\n--- a/contrib/difftool/git-difftool-helper\n+++ b/contrib/difftool/git-difftool-helper\n@@ -86,11 +86,11 @@ launch_merge_tool () {\n \t\t;;\n \n \tvimdiff)\n-\t\t\"$merge_tool_path\" -c \"wincmd l\" \"$LOCAL\" \"$REMOTE\"\n+\t\t\"$merge_tool_path\" -d -c \"wincmd l\" \"$LOCAL\" \"$REMOTE\"\n \t\t;;\n \n \tgvimdiff)\n-\t\t\"$merge_tool_path\" -c \"wincmd l\" -f \"$LOCAL\" \"$REMOTE\"\n+\t\t\"$merge_tool_path\" -d -c \"wincmd l\" -f \"$LOCAL\" \"$REMOTE\"\n \t\t;;\n \n \txxdiff)\n@@ -160,6 +160,12 @@ init_merge_tool_path() {\n \tmerge_tool_path=$(git config mergetool.\"$1\".path)\n \tif test -z \"$merge_tool_path\"; then\n \t\tcase \"$1\" in\n+\t\tvimdiff)\n+\t\t\tmerge_tool_path=vim\n+\t\t\t;;\n+\t\tgvimdiff)\n+\t\t\tmerge_tool_path=gvim\n+\t\t\t;;\n \t\temerge)\n \t\t\tmerge_tool_path=emacs\n \t\t\t;;\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex 87fa88a..6e611e9 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -214,12 +214,12 @@ merge_file () {\n \t    ;;\n \tvimdiff)\n \t    touch \"$BACKUP\"\n-\t    \"$merge_tool_path\" -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t    \"$merge_tool_path\" -d -c \"wincmd l\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t    check_unchanged\n \t    ;;\n \tgvimdiff)\n \t    touch \"$BACKUP\"\n-\t    \"$merge_tool_path\" -c \"wincmd l\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n+\t    \"$merge_tool_path\" -d -c \"wincmd l\" -f \"$LOCAL\" \"$MERGED\" \"$REMOTE\"\n \t    check_unchanged\n \t    ;;\n \txxdiff)\n@@ -359,6 +359,12 @@ init_merge_tool_path() {\n \tmerge_tool_path=`git config mergetool.$1.path`\n \tif test -z \"$merge_tool_path\" ; then\n \t\tcase \"$1\" in\n+\t\t\tvimdiff)\n+\t\t\t\tmerge_tool_path=vim\n+\t\t\t\t;;\n+\t\t\tgvimdiff)\n+\t\t\t\tmerge_tool_path=gvim\n+\t\t\t\t;;\n \t\t\temerge)\n \t\t\t\tmerge_tool_path=emacs\n \t\t\t\t;;\n-- \n1.6.2.2.460.g49e5c\n"},{"id":"110410","messageId":"200904051443.28462.markus.heidelberg@web.de","threadId":"18734","inReplyTo":"200904051440.33154.markus.heidelberg@web.de","subject":"[PATCH 3/3] git-mergetool: add new merge tool TortoiseMerge","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-05T12:43:27Z","receivedAt":"2009-04-05T12:43:27Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"TortoiseMerge comes with TortoiseSVN or TortoiseGit for Windows. It can\nonly be used as a merge tool with an existing base file. It cannot be\nused without a base nor as a diff tool.\n\nThe documentation only mentions the slash '/' as command line option\nprefix, which refused to work, but the parser also accepts the dash '-'\n\nSee http://code.google.com/p/msysgit/issues/detail?id=226\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n Documentation/git-mergetool.txt |    3 ++-\n Documentation/merge-config.txt  |    2 +-\n git-mergetool.sh                |   16 +++++++++++++---\n 3 files changed, 16 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex 5d3c632..5edac4d 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -26,7 +26,8 @@ OPTIONS\n --tool=<tool>::\n \tUse the merge resolution program specified by <tool>.\n \tValid merge tools are:\n-\tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff\n+\tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,\n+\ttortoisemerge and opendiff\n +\n If a merge resolution program is not specified, 'git-mergetool'\n will use the configuration variable `merge.tool`.  If the\ndiff --git a/Documentation/merge-config.txt b/Documentation/merge-config.txt\nindex 9c44af8..8c10f66 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -23,7 +23,7 @@ merge.tool::\n \tControls which merge resolution program is used by\n \tlinkgit:git-mergetool[1].  Valid built-in values are: \"kdiff3\",\n \t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\",\n-\t\"ecmerge\" and\n+\t\"ecmerge\", tortoisemerge and\n \t\"opendiff\".  Any other value is treated is custom merge tool\n \tand there must be a corresponding mergetool.<tool>.cmd option.\n \ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex 6e611e9..be9717a 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -265,6 +265,16 @@ merge_file () {\n \t    fi\n \t    status=$?\n \t    ;;\n+\ttortoisemerge)\n+\t    if base_present ; then\n+\t\ttouch \"$BACKUP\"\n+\t\t\"$merge_tool_path\" -base:\"$BASE\" -mine:\"$LOCAL\" -theirs:\"$REMOTE\" -merged:\"$MERGED\"\n+\t\tcheck_unchanged\n+\t    else\n+\t\techo \"TortoiseMerge cannot be used without a base\" 1>&2\n+\t\tstatus=1\n+\t    fi\n+\t    ;;\n \t*)\n \t    if test -n \"$merge_tool_cmd\"; then\n \t\tif test \"$merge_tool_trust_exit_code\" = \"false\"; then\n@@ -345,7 +355,7 @@ valid_custom_tool()\n \n valid_tool() {\n \tcase \"$1\" in\n-\t\tkdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)\n+\t\tkdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | tortoisemerge)\n \t\t\t;; # happy\n \t\t*)\n \t\t\tif ! valid_custom_tool \"$1\"; then\n@@ -404,9 +414,9 @@ fi\n if test -z \"$merge_tool\" ; then\n     if test -n \"$DISPLAY\"; then\n         if test -n \"$GNOME_DESKTOP_SESSION_ID\" ; then\n-            merge_tool_candidates=\"meld kdiff3 tkdiff xxdiff gvimdiff\"\n+            merge_tool_candidates=\"meld kdiff3 tkdiff xxdiff tortoisemerge gvimdiff\"\n         else\n-            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld gvimdiff\"\n+            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff\"\n         fi\n     fi\n     if echo \"${VISUAL:-$EDITOR}\" | grep 'emacs' > /dev/null 2>&1; then\n-- \n1.6.2.2.460.g49e5c\n"},{"id":"110416","messageId":"alpine.DEB.1.00.0904051551400.10279@pacific.mpi-cbg.de","threadId":"18734","inReplyTo":"200904051440.33154.markus.heidelberg@web.de","subject":"Re: [PATCH 0/3] git-mergetool/difftool: TortoiseMerge and (g)vimdiff for Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-04-05T13:52:03Z","receivedAt":"2009-04-05T13:52:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 5 Apr 2009, Markus Heidelberg wrote:\n\n> Patches 2/3 and 3/3 are already in 'da/difftool' in 'pu'. This series is\n> based on 'master', now they can be applied to 4msysgit.git.\n\nThanks, they are in, as branch 'tortoisemerge'.\n\nCiao,\nDscho\n"}]}