{"thread":{"id":"35133","subject":"[PATCH v3] mergetools/diffmerge: support DiffMerge as a git mergetool","startedAt":"2013-10-12T22:29:35Z","lastAt":"2013-10-13T23:01:48Z","messageCount":2,"participants":["Stefan Saasen","Jonathan Nieder"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"228890","messageId":"1381616975-13582-1-git-send-email-ssaasen@atlassian.com","threadId":"35133","inReplyTo":null,"subject":"[PATCH v3] mergetools/diffmerge: support DiffMerge as a git mergetool","fromName":"Stefan Saasen","fromEmail":"ssaasen@atlassian.com","sentAt":"2013-10-12T22:29:35Z","receivedAt":"2013-10-12T22:29:35Z","isPatch":true,"sender":{"key":"ssaasen@atlassian.com","avatar":null},"body":"DiffMerge is a non-free (but gratis) tool that supports OS X, Windows and Linux.\n\n    See http://www.sourcegear.com/diffmerge/\n\nDiffMerge includes a script `/usr/bin/diffmerge` that can be used to launch the\ngraphical compare tool.\n\nThis change adds mergetool support for DiffMerge and adds 'diffmerge' as an\noption to the mergetool help.\n\nSigned-off-by: Stefan Saasen <ssaasen@atlassian.com>\nAcked-by: David Aguilar <davvid@gmail.com>\n---\n contrib/completion/git-completion.bash |  2 +-\n git-mergetool--lib.sh                  |  3 ++-\n mergetools/diffmerge                   | 15 +++++++++++++++\n 3 files changed, 18 insertions(+), 2 deletions(-)\n create mode 100644 mergetools/diffmerge\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e1b7313..07b0ba5 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1188,7 +1188,7 @@ _git_diff ()\n \t__git_complete_revlist_file\n }\n \n-__git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n+__git_mergetools_common=\"diffuse diffmerge ecmerge emerge kdiff3 meld opendiff\n \t\t\ttkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare\n \"\n \ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex feee6a4..858bc37 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -250,7 +250,8 @@ list_merge_tool_candidates () {\n \t\telse\n \t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n-\t\ttools=\"$tools gvimdiff diffuse ecmerge p4merge araxis bc3 codecompare\"\n+\t\ttools=\"$tools gvimdiff diffuse diffmerge ecmerge\"\n+\t\ttools=\"$tools p4merge araxis bc3 codecompare\"\n \tfi\n \tcase \"${VISUAL:-$EDITOR}\" in\n \t*vim*)\ndiff --git a/mergetools/diffmerge b/mergetools/diffmerge\nnew file mode 100644\nindex 0000000..85ac720\n--- /dev/null\n+++ b/mergetools/diffmerge\n@@ -0,0 +1,15 @@\n+diff_cmd () {\n+\t\"$merge_tool_path\" \"$LOCAL\" \"$REMOTE\" >/dev/null 2>&1\n+}\n+\n+merge_cmd () {\n+\tif $base_present\n+\tthen\n+\t\t\"$merge_tool_path\" --merge --result=\"$MERGED\" \\\n+\t\t\t\"$LOCAL\" \"$BASE\" \"$REMOTE\"\n+\telse\n+\t\t\"$merge_tool_path\" --merge \\\n+\t\t\t--result=\"$MERGED\" \"$LOCAL\" \"$REMOTE\"\n+\tfi\n+\tstatus=$?\n+}\n-- \n1.8.2.3\n"},{"id":"228912","messageId":"20131013230148.GC13033@google.com","threadId":"35133","inReplyTo":"1381616975-13582-1-git-send-email-ssaasen@atlassian.com","subject":"Re: [PATCH v3] mergetools/diffmerge: support DiffMerge as a git mergetool","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-10-13T23:01:48Z","receivedAt":"2013-10-13T23:01:48Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Stefan Saasen wrote:\n\n> Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>\n> Acked-by: David Aguilar <davvid@gmail.com>\n\nThanks.\n"}]}