{"thread":{"id":"18689","subject":"[PATCH 3/3] mergetool-lib: add diffuse as merge and diff tool","startedAt":"2009-04-02T10:30:44Z","lastAt":"2009-04-03T01:56:12Z","messageCount":7,"participants":["David Aguilar","Junio C Hamano","Markus Heidelberg"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"110202","messageId":"1238668246-762-1-git-send-email-davvid@gmail.com","threadId":"18689","inReplyTo":null,"subject":"[PATCH 1/3] mergetool-lib: specialize kdiff3 options when in diff mode","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-02T10:30:44Z","receivedAt":"2009-04-02T10:30:44Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"kdiff3 should only show two files when in diff mode.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-mergetool-lib.sh |   16 +++++++++++++---\n 1 files changed, 13 insertions(+), 3 deletions(-)\n\ndiff --git a/git-mergetool-lib.sh b/git-mergetool-lib.sh\nindex d28be68..e2d074d 100644\n--- a/git-mergetool-lib.sh\n+++ b/git-mergetool-lib.sh\n@@ -67,9 +67,19 @@ run_mergetool () {\n \t\t\t --L1 \"$MERGED (Base)\" --L2 \"$MERGED (Local)\" --L3 \"$MERGED (Remote)\" \\\n \t\t\t -o \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" > /dev/null 2>&1)\n \t\telse\n-\t\t\t(\"$merge_tool_path\" --auto \\\n-\t\t\t --L1 \"$MERGED (Local)\" --L2 \"$MERGED (Remote)\" \\\n-\t\t\t -o \"$MERGED\" \"$LOCAL\" \"$REMOTE\" > /dev/null 2>&1)\n+\t\t\tif merge_mode; then\n+\t\t\t\t(\"$merge_tool_path\" --auto \\\n+\t\t\t\t --L1 \"$MERGED (Local)\" \\\n+\t\t\t\t --L2 \"$MERGED (Remote)\" \\\n+\t\t\t\t -o \"$MERGED\" \"$LOCAL\" \"$REMOTE\" \\\n+\t\t\t\t> /dev/null 2>&1)\n+\t\t\telse\n+\t\t\t\t(\"$merge_tool_path\" --auto \\\n+\t\t\t\t --L1 \"$MERGED (A)\" \\\n+\t\t\t\t --L2 \"$MERGED (B)\" \\\n+\t\t\t\t \"$LOCAL\" \"$REMOTE\" \\\n+\t\t\t\t> /dev/null 2>&1)\n+\t\t\tfi\n \t\tfi\n \t\tstatus=$?\n \t\t;;\n-- \n1.6.2.1.303.g63699\n"},{"id":"110203","messageId":"1238668246-762-2-git-send-email-davvid@gmail.com","threadId":"18689","inReplyTo":"1238668246-762-1-git-send-email-davvid@gmail.com","subject":"[PATCH 2/3] mergetool-lib: specialize xxdiff options when in diff mode","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-02T10:30:45Z","receivedAt":"2009-04-02T10:30:45Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"We don't need '-merged-file', 'save as', and the merge-status exit\ncode when in diff mode\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n git-mergetool-lib.sh |   22 +++++++++++++++-------\n 1 files changed, 15 insertions(+), 7 deletions(-)\n\ndiff --git a/git-mergetool-lib.sh b/git-mergetool-lib.sh\nindex e2d074d..3ba332b 100644\n--- a/git-mergetool-lib.sh\n+++ b/git-mergetool-lib.sh\n@@ -127,7 +127,9 @@ run_mergetool () {\n \t\tfi\n \t\t;;\n \txxdiff)\n-\t\tmerge_mode && touch \"$BACKUP\"\n+\t\tif merge_mode; then\n+\t\t\ttouch \"$BACKUP\"\n+\t\tfi\n \t\tif $base_present; then\n \t\t\t\"$merge_tool_path\" -X --show-merged-pane \\\n \t\t\t    -R 'Accel.SaveAsMerged: \"Ctrl-S\"' \\\n@@ -135,12 +137,18 @@ run_mergetool () {\n \t\t\t    -R 'Accel.SearchForward: \"Ctrl-G\"' \\\n \t\t\t    --merged-file \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"\n \t\telse\n-\t\t\tmerge_mode && extra=--show-merged-pane\n-\t\t\t\"$merge_tool_path\" -X $extra \\\n-\t\t\t\t-R 'Accel.SaveAsMerged: \"Ctrl-S\"' \\\n-\t\t\t\t-R 'Accel.Search: \"Ctrl+F\"' \\\n-\t\t\t\t-R 'Accel.SearchForward: \"Ctrl-G\"' \\\n-\t\t\t\t--merged-file \"$MERGED\" \"$LOCAL\" \"$REMOTE\"\n+\t\t\tif merge_mode; then\n+\t\t\t\t\"$merge_tool_path\" -X $extra \\\n+\t\t\t\t\t-R 'Accel.SaveAsMerged: \"Ctrl-S\"' \\\n+\t\t\t\t\t-R 'Accel.Search: \"Ctrl+F\"' \\\n+\t\t\t\t\t-R 'Accel.SearchForward: \"Ctrl-G\"' \\\n+\t\t\t\t\t--merged-file \"$MERGED\" \"$LOCAL\" \"$REMOTE\"\n+\t\t\telse\n+\t\t\t\t\"$merge_tool_path\" \\\n+\t\t\t\t\t-R 'Accel.Search: \"Ctrl+F\"' \\\n+\t\t\t\t\t-R 'Accel.SearchForward: \"Ctrl-G\"' \\\n+\t\t\t\t\t\"$LOCAL\" \"$REMOTE\"\n+\t\t\tfi\n \t\tfi\n \t\tcheck_unchanged\n \t\t;;\n-- \n1.6.2.1.303.g63699\n"},{"id":"110201","messageId":"1238668246-762-3-git-send-email-davvid@gmail.com","threadId":"18689","inReplyTo":"1238668246-762-2-git-send-email-davvid@gmail.com","subject":"[PATCH 3/3] mergetool-lib: add diffuse as merge and diff tool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-02T10:30:46Z","receivedAt":"2009-04-02T10:30:46Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"From: Sebastian Pipping <sebastian@pipping.org>\n\nThis adds diffuse as a built-in merge tool.\n\nSigned-off-by: Sebastian Pipping <sebastian@pipping.org>\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nThis is Sebastian's patch rebased onto Junio's pu branch.\n\nI removed the git-gui part because I think git-gui\npatches go through Shawn / git-gui.git?\n\n\nThis diff is still too big, so maybe we should\nrefactor the $mergetool_candidate code into\nmergetool-lib as well.\n\n Documentation/git-difftool.txt         |    4 ++--\n Documentation/git-mergetool.txt        |    3 ++-\n Documentation/merge-config.txt         |    7 ++++---\n contrib/completion/git-completion.bash |    3 ++-\n git-difftool-helper.sh                 |    6 ++----\n git-mergetool-lib.sh                   |   17 ++++++++++++++++-\n git-mergetool.sh                       |    4 ++--\n 7 files changed, 30 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt\nindex 73d4782..15b247b 100644\n--- a/Documentation/git-difftool.txt\n+++ b/Documentation/git-difftool.txt\n@@ -30,8 +30,8 @@ OPTIONS\n --tool=<tool>::\n \tUse the diff tool specified by <tool>.\n \tValid merge tools are:\n-\tkdiff3, kompare, tkdiff, meld, xxdiff, emerge,\n-\tvimdiff, gvimdiff, ecmerge, and opendiff\n+\tkdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n+\tecmerge, diffuse and opendiff\n +\n If a diff tool is not specified, 'git-difftool'\n will use the configuration variable `diff.tool`.  If the\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex 5d3c632..c3a8092 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+\tdiffuse 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 1ff08ff..c4fc3eb 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -22,9 +22,10 @@ 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\"opendiff\".  Any other value is treated is custom merge tool\n-\tand there must be a corresponding mergetool.<tool>.cmd option.\n+\t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\",\n+\t\"diffuse\" and \"opendiff\".  Any other value is treated as a custom\n+\tmerge tool and there must be a corresponding mergetool.<tool>.cmd\n+\toption.\n \n merge.verbosity::\n \tControls the amount of output shown by the recursive merge\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e72ce24..4fcd77a 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1173,7 +1173,8 @@ _git_mergetool ()\n \t--tool=*)\n \t\t__gitcomp \"\n \t\t\tkdiff3 tkdiff meld xxdiff emerge\n-\t\t\tvimdiff gvimdiff ecmerge opendiff\n+\t\t\tvimdiff gvimdiff ecmerge diffuse\n+\t\t\topendiff\n \t\t\t\" \"\" \"${cur##--tool=}\"\n \t\treturn\n \t\t;;\ndiff --git a/git-difftool-helper.sh b/git-difftool-helper.sh\nindex 2dfc870..d174b34 100755\n--- a/git-difftool-helper.sh\n+++ b/git-difftool-helper.sh\n@@ -1,7 +1,5 @@\n #!/bin/sh\n # git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.\n-# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,\n-# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.\n # This script is typically launched by using the 'git difftool'\n # convenience command.\n #\n@@ -70,9 +68,9 @@ if test -z \"$merge_tool\"; then\n \tif test -n \"$DISPLAY\"; then\n \t\t# If gnome then prefer meld, otherwise, prefer kdiff3 or kompare\n \t\tif test -n \"$GNOME_DESKTOP_SESSION_ID\" ; then\n-\t\t\tmerge_tool_candidates=\"meld kdiff3 kompare tkdiff xxdiff gvimdiff\"\n+\t\t\tmerge_tool_candidates=\"meld kdiff3 kompare tkdiff xxdiff gvimdiff diffuse\"\n \t\telse\n-\t\t\tmerge_tool_candidates=\"kdiff3 kompare tkdiff xxdiff meld gvimdiff\"\n+\t\t\tmerge_tool_candidates=\"kdiff3 kompare tkdiff xxdiff meld gvimdiff diffuse\"\n \t\tfi\n \tfi\n \tif echo \"${VISUAL:-$EDITOR}\" | grep 'emacs' > /dev/null 2>&1; then\ndiff --git a/git-mergetool-lib.sh b/git-mergetool-lib.sh\nindex 3ba332b..197533e 100644\n--- a/git-mergetool-lib.sh\n+++ b/git-mergetool-lib.sh\n@@ -29,7 +29,7 @@ check_unchanged () {\n \n valid_tool () {\n \tcase \"$1\" in\n-\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)\n+\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse)\n \t\tif test \"$1\" = \"kompare\" && ! diff_mode; then\n \t\t\treturn 1\n \t\tfi\n@@ -108,6 +108,21 @@ run_mergetool () {\n \t\tfi\n \t\tcheck_unchanged\n \t\t;;\n+\tdiffuse)\n+\t\tif merge_mode; then\n+\t\t\ttouch \"$BACKUP\"\n+\t\tfi\n+\t\tif $base_present; then\n+\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\" \"$BASE\" | cat\n+\t\telse\n+\t\t\tif merge_mode; then\n+\t\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\" | cat\n+\t\t\telse\n+\t\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$REMOTE\" | cat\n+\t\t\tfi\n+\t\tfi\n+\t\tcheck_unchanged\n+\t\t;;\n \tvimdiff)\n \t\tif merge_mode; then\n \t\t\ttouch \"$BACKUP\"\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex fd81ad7..16562bd 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -284,9 +284,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 gvimdiff diffuse\"\n         else\n-            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld gvimdiff\"\n+            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld gvimdiff diffuse\"\n         fi\n     fi\n     if echo \"${VISUAL:-$EDITOR}\" | grep 'emacs' > /dev/null 2>&1; then\n-- \n1.6.2.1.303.g63699\n"},{"id":"110205","messageId":"20090402104252.GA29223@gmail.com","threadId":"18689","inReplyTo":"1238668246-762-3-git-send-email-davvid@gmail.com","subject":"Re: [PATCH 3/3] mergetool-lib: add diffuse as merge and diff tool","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-02T10:42:53Z","receivedAt":"2009-04-02T10:42:53Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On  0, David Aguilar <davvid@gmail.com> wrote:\n> From: Sebastian Pipping <sebastian@pipping.org>\n> \n> This adds diffuse as a built-in merge tool.\n> \n> Signed-off-by: Sebastian Pipping <sebastian@pipping.org>\n> Signed-off-by: David Aguilar <davvid@gmail.com>\n> ---\n> \n> This is Sebastian's patch rebased onto Junio's pu branch.\n> \n> I removed the git-gui part because I think git-gui\n> patches go through Shawn / git-gui.git?\n> \n\nHi Sebastian..\nHere's the patch you sent a couple of days ago applied\nonto Junio's pu branch\n\nAs I mentioned above, you had some git-gui changes in your\noriginal that I stripped out since I was under the impression\nthat git-gui patches go through Shawn / git-gui.git.\n\ngit-send-email (probably gmail, too) won't let me send\none patch in a series with a different \"From:\" header,\nso maybe you should resend this patch so that you can get the\nproper authorship recognition?  I've attached the original\npatch file I sent in case you want to just grab it and\nsend-email it back out for the purposes of getting the right\nauthorship in there (actually, Junio, please advise...,\nI'm not exactly sure what you'd prefer)\n\n\nAlso, all three patches should apply independently,\nso even though this says 3/3 in principle they are\nactually all independent patches,\nI just happened to have them queued up that way.\n\n\n\n> \n>  Documentation/git-difftool.txt         |    4 ++--\n>  Documentation/git-mergetool.txt        |    3 ++-\n>  Documentation/merge-config.txt         |    7 ++++---\n>  contrib/completion/git-completion.bash |    3 ++-\n>  git-difftool-helper.sh                 |    6 ++----\n>  git-mergetool-lib.sh                   |   17 ++++++++++++++++-\n>  git-mergetool.sh                       |    4 ++--\n>  7 files changed, 30 insertions(+), 14 deletions(-)\n> \n\n-- \n\n\tDavid\n\n\n\n\n>From 34186399f67930e3e0f6a8772fbea2966c997cfa Mon Sep 17 00:00:00 2001\nFrom: Sebastian Pipping <sebastian@pipping.org>\nDate: Thu, 26 Mar 2009 20:42:31 +0100\nSubject: [PATCH 3/3] mergetool-lib: add diffuse as merge and diff tool\n\nThis adds diffuse as a built-in merge tool.\n\nSigned-off-by: Sebastian Pipping <sebastian@pipping.org>\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nThis is Sebastian's patch rebased onto Junio's pu branch.\n\nI removed the git-gui part because I think git-gui\npatches go through Shawn / git-gui.git?\n\n\nThis diff is still too big, so maybe we should\nrefactor the $mergetool_candidate code into\nmergetool-lib as well.\n\n Documentation/git-difftool.txt         |    4 ++--\n Documentation/git-mergetool.txt        |    3 ++-\n Documentation/merge-config.txt         |    7 ++++---\n contrib/completion/git-completion.bash |    3 ++-\n git-difftool-helper.sh                 |    6 ++----\n git-mergetool-lib.sh                   |   17 ++++++++++++++++-\n git-mergetool.sh                       |    4 ++--\n 7 files changed, 30 insertions(+), 14 deletions(-)\n\ndiff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt\nindex 73d4782..15b247b 100644\n--- a/Documentation/git-difftool.txt\n+++ b/Documentation/git-difftool.txt\n@@ -30,8 +30,8 @@ OPTIONS\n --tool=<tool>::\n \tUse the diff tool specified by <tool>.\n \tValid merge tools are:\n-\tkdiff3, kompare, tkdiff, meld, xxdiff, emerge,\n-\tvimdiff, gvimdiff, ecmerge, and opendiff\n+\tkdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n+\tecmerge, diffuse and opendiff\n +\n If a diff tool is not specified, 'git-difftool'\n will use the configuration variable `diff.tool`.  If the\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex 5d3c632..c3a8092 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+\tdiffuse 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 1ff08ff..c4fc3eb 100644\n--- a/Documentation/merge-config.txt\n+++ b/Documentation/merge-config.txt\n@@ -22,9 +22,10 @@ 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\"opendiff\".  Any other value is treated is custom merge tool\n-\tand there must be a corresponding mergetool.<tool>.cmd option.\n+\t\"tkdiff\", \"meld\", \"xxdiff\", \"emerge\", \"vimdiff\", \"gvimdiff\",\n+\t\"diffuse\" and \"opendiff\".  Any other value is treated as a custom\n+\tmerge tool and there must be a corresponding mergetool.<tool>.cmd\n+\toption.\n \n merge.verbosity::\n \tControls the amount of output shown by the recursive merge\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e72ce24..4fcd77a 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1173,7 +1173,8 @@ _git_mergetool ()\n \t--tool=*)\n \t\t__gitcomp \"\n \t\t\tkdiff3 tkdiff meld xxdiff emerge\n-\t\t\tvimdiff gvimdiff ecmerge opendiff\n+\t\t\tvimdiff gvimdiff ecmerge diffuse\n+\t\t\topendiff\n \t\t\t\" \"\" \"${cur##--tool=}\"\n \t\treturn\n \t\t;;\ndiff --git a/git-difftool-helper.sh b/git-difftool-helper.sh\nindex 2dfc870..d174b34 100755\n--- a/git-difftool-helper.sh\n+++ b/git-difftool-helper.sh\n@@ -1,7 +1,5 @@\n #!/bin/sh\n # git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.\n-# It supports kdiff3, kompare, tkdiff, xxdiff, meld, opendiff,\n-# emerge, ecmerge, vimdiff, gvimdiff, and custom user-configurable tools.\n # This script is typically launched by using the 'git difftool'\n # convenience command.\n #\n@@ -70,9 +68,9 @@ if test -z \"$merge_tool\"; then\n \tif test -n \"$DISPLAY\"; then\n \t\t# If gnome then prefer meld, otherwise, prefer kdiff3 or kompare\n \t\tif test -n \"$GNOME_DESKTOP_SESSION_ID\" ; then\n-\t\t\tmerge_tool_candidates=\"meld kdiff3 kompare tkdiff xxdiff gvimdiff\"\n+\t\t\tmerge_tool_candidates=\"meld kdiff3 kompare tkdiff xxdiff gvimdiff diffuse\"\n \t\telse\n-\t\t\tmerge_tool_candidates=\"kdiff3 kompare tkdiff xxdiff meld gvimdiff\"\n+\t\t\tmerge_tool_candidates=\"kdiff3 kompare tkdiff xxdiff meld gvimdiff diffuse\"\n \t\tfi\n \tfi\n \tif echo \"${VISUAL:-$EDITOR}\" | grep 'emacs' > /dev/null 2>&1; then\ndiff --git a/git-mergetool-lib.sh b/git-mergetool-lib.sh\nindex 3ba332b..197533e 100644\n--- a/git-mergetool-lib.sh\n+++ b/git-mergetool-lib.sh\n@@ -29,7 +29,7 @@ check_unchanged () {\n \n valid_tool () {\n \tcase \"$1\" in\n-\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge)\n+\tkdiff3 | kompare | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | ecmerge | diffuse)\n \t\tif test \"$1\" = \"kompare\" && ! diff_mode; then\n \t\t\treturn 1\n \t\tfi\n@@ -108,6 +108,21 @@ run_mergetool () {\n \t\tfi\n \t\tcheck_unchanged\n \t\t;;\n+\tdiffuse)\n+\t\tif merge_mode; then\n+\t\t\ttouch \"$BACKUP\"\n+\t\tfi\n+\t\tif $base_present; then\n+\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\" \"$BASE\" | cat\n+\t\telse\n+\t\t\tif merge_mode; then\n+\t\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\" | cat\n+\t\t\telse\n+\t\t\t\t\"$merge_tool_path\" \"$LOCAL\" \"$REMOTE\" | cat\n+\t\t\tfi\n+\t\tfi\n+\t\tcheck_unchanged\n+\t\t;;\n \tvimdiff)\n \t\tif merge_mode; then\n \t\t\ttouch \"$BACKUP\"\ndiff --git a/git-mergetool.sh b/git-mergetool.sh\nindex fd81ad7..16562bd 100755\n--- a/git-mergetool.sh\n+++ b/git-mergetool.sh\n@@ -284,9 +284,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 gvimdiff diffuse\"\n         else\n-            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld gvimdiff\"\n+            merge_tool_candidates=\"kdiff3 tkdiff xxdiff meld gvimdiff diffuse\"\n         fi\n     fi\n     if echo \"${VISUAL:-$EDITOR}\" | grep 'emacs' > /dev/null 2>&1; then\n-- \n1.6.2.1.303.g63699\n\n"},{"id":"110228","messageId":"7vhc17exrk.fsf@gitster.siamese.dyndns.org","threadId":"18689","inReplyTo":"20090402104252.GA29223@gmail.com","subject":"Re: [PATCH 3/3] mergetool-lib: add diffuse as merge and diff tool","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-02T18:06:07Z","receivedAt":"2009-04-02T18:06:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Aguilar <davvid@gmail.com> writes:\n\n> git-send-email (probably gmail, too) won't let me send\n> one patch in a series with a different \"From:\" header,\n> so maybe you should resend this patch so that you can get the\n> proper authorship recognition?  I've attached the original\n> patch file I sent in case you want to just grab it and\n> send-email it back out for the purposes of getting the right\n> authorship in there (actually, Junio, please advise...,\n> I'm not exactly sure what you'd prefer)\n\nThe way you marked your 3/3 with a From: line in the body of the message\nis the preferred way to say \"David forwards a patch from Sebastian\", and\nour patch application tool knows about it.\n\nIf you wanted to preserve the original author date, you could have also\nadded a Date: line in-body (\"David forwards a patch from Sebastian, who\ncreated it at this date in this timezone\").  You can find an earlier\nexample in:\n\n    http://article.gmane.org/gmane.comp.version-control.git/115289\n"},{"id":"110248","messageId":"200904022320.55334.markus.heidelberg@web.de","threadId":"18689","inReplyTo":"1238668246-762-2-git-send-email-davvid@gmail.com","subject":"Re: [PATCH 2/3] mergetool-lib: specialize xxdiff options when in diff mode","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-04-02T21:20:55Z","receivedAt":"2009-04-02T21:20:55Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"David Aguilar, 02.04.2009:\n> We don't need '-merged-file', 'save as', and the merge-status exit\n> code when in diff mode\n\nI guess the same as for xxdiff and kdiff3 also applies to opendiff,\necmerge and emerge. But since I don't have them installed, I'm not\nentirely sure not to break something.\nOn the other hand it should be save, since they were just copied from\ngit-mergetool without adjustment for diff use.\n\nMarkus\n"},{"id":"110258","messageId":"20090403015610.GB52576@gmail.com","threadId":"18689","inReplyTo":"200904022320.55334.markus.heidelberg@web.de","subject":"Re: [PATCH 2/3] mergetool-lib: specialize xxdiff options when in diff mode","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-04-03T01:56:12Z","receivedAt":"2009-04-03T01:56:12Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On  0, Markus Heidelberg <markus.heidelberg@web.de> wrote:\n> David Aguilar, 02.04.2009:\n> > We don't need '-merged-file', 'save as', and the merge-status exit\n> > code when in diff mode\n> \n> I guess the same as for xxdiff and kdiff3 also applies to opendiff,\n> ecmerge and emerge. But since I don't have them installed, I'm not\n> entirely sure not to break something.\n> On the other hand it should be save, since they were just copied from\n> git-mergetool without adjustment for diff use.\n> \n> Markus\n> \n\nI have opendiff on a mac at work so I'll give it a test there\nand send a patch once it's working.\n\n-- \n\t\tDavid\n"}]}