{"thread":{"id":"19461","subject":"[PATCH v2] mergetool--lib: add support for araxis merge","startedAt":"2009-05-24T00:24:41Z","lastAt":"2009-05-24T00:24:41Z","messageCount":1,"participants":["David Aguilar"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"114542","messageId":"1243272220-40471-1-git-send-email-davvid@gmail.com","threadId":"19461","inReplyTo":null,"subject":"[PATCH v2] mergetool--lib: add support for araxis merge","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-05-24T00:24:41Z","receivedAt":"2009-05-24T00:24:41Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"Araxis merge is now a built-in diff/merge tool.\nThis adds araxis to git-completion and updates\nthe documentation to mention araxis.\n\nSigned-off-by: David Aguilar <davvid@gmail.com>\n---\n\nMarkus noticed that we forgot to touch \"$BACKUP\" so this is v2.\n\n Documentation/git-difftool.txt         |    2 +-\n Documentation/git-mergetool.txt        |    2 +-\n Documentation/merge-config.txt         |    2 +-\n contrib/completion/git-completion.bash |    2 +-\n git-mergetool--lib.sh                  |   25 +++++++++++++++++++++++--\n 5 files changed, 27 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt\nindex 15b247b..96a6c51 100644\n--- a/Documentation/git-difftool.txt\n+++ b/Documentation/git-difftool.txt\n@@ -31,7 +31,7 @@ OPTIONS\n \tUse the diff tool specified by <tool>.\n \tValid merge tools are:\n \tkdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,\n-\tecmerge, diffuse and opendiff\n+\tecmerge, diffuse, opendiff and araxis.\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 ff9700d..68ed6c0 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -27,7 +27,7 @@ OPTIONS\n \tUse the merge resolution program specified by <tool>.\n \tValid merge tools are:\n \tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,\n-\tdiffuse, tortoisemerge and opendiff\n+\tdiffuse, tortoisemerge, opendiff and araxis.\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 4832bc7..c0f96e7 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\"diffuse\", \"ecmerge\", \"tortoisemerge\", and\n+\t\"diffuse\", \"ecmerge\", \"tortoisemerge\", \"araxis\", 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/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 1683e6d..ead530d 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -911,7 +911,7 @@ _git_diff ()\n }\n \n __git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n-\t\t\ttkdiff vimdiff gvimdiff xxdiff\n+\t\t\ttkdiff vimdiff gvimdiff xxdiff araxis\n \"\n \n _git_difftool ()\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex 8b5e6a8..bfb01f7 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -18,6 +18,9 @@ translate_merge_tool_path () {\n \temerge)\n \t\techo emacs\n \t\t;;\n+\taraxis)\n+\t\techo compare\n+\t\t;;\n \t*)\n \t\techo \"$1\"\n \t\t;;\n@@ -43,7 +46,7 @@ check_unchanged () {\n valid_tool () {\n \tcase \"$1\" in\n \tkdiff3 | tkdiff | xxdiff | meld | opendiff | \\\n-\temerge | vimdiff | gvimdiff | ecmerge | diffuse)\n+\temerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)\n \t\t;; # happy\n \ttortoisemerge)\n \t\tif ! merge_mode; then\n@@ -263,6 +266,24 @@ run_merge_tool () {\n \t\t\tstatus=1\n \t\tfi\n \t\t;;\n+\taraxis)\n+\t\tif merge_mode; then\n+\t\t\ttouch \"$BACKUP\"\n+\t\t\tif $base_present; then\n+\t\t\t\t\"$merge_tool_path\" -wait -merge -3 -a1 \\\n+\t\t\t\t\t\"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n+\t\t\t\t\t>/dev/null 2>&1\n+\t\t\telse\n+\t\t\t\t\"$merge_tool_path\" -wait -2 \\\n+\t\t\t\t\t\"$LOCAL\" \"$REMOTE\" \"$MERGED\" \\\n+\t\t\t\t\t>/dev/null 2>&1\n+\t\t\tfi\n+\t\t\tcheck_unchanged\n+\t\telse\n+\t\t\t\"$merge_tool_path\" -wait -2 \"$LOCAL\" \"$REMOTE\" \\\n+\t\t\t\t>/dev/null 2>&1\n+\t\tfi\n+\t\t;;\n \t*)\n \t\tmerge_tool_cmd=\"$(get_merge_tool_cmd \"$1\")\"\n \t\tif test -z \"$merge_tool_cmd\"; then\n@@ -302,7 +323,7 @@ guess_merge_tool () {\n \t\telse\n \t\t\ttools=\"opendiff kdiff3 tkdiff xxdiff meld $tools\"\n \t\tfi\n-\t\ttools=\"$tools gvimdiff diffuse ecmerge\"\n+\t\ttools=\"$tools gvimdiff diffuse ecmerge araxis\"\n \tfi\n \tif echo \"${VISUAL:-$EDITOR}\" | grep emacs > /dev/null 2>&1; then\n \t\t# $EDITOR is emacs so add emerge as a candidate\n-- \n1.6.3.1.145.gb74d77\n"}]}