mergetool--lib: add support for araxis merge
Araxis merge is now a built-in diff/merge tool. This adds araxis to git-completion and updates the documentation to mention araxis. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar committed
May 24, 2009 at 00:24 UTC
b6f0621a462e4ff11999c8e2d8279c0ffd3be201
5 files changed
+27
-6
Documentation/git-difftool.txt
+1
-1
@@ -31,7 +31,7 @@ OPTIONS
31
Use the diff tool specified by <tool>.
32
Valid merge tools are:
33
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
34
- ecmerge, diffuse and opendiff
34
+ ecmerge, diffuse, opendiff and araxis.
35
+
36
If a diff tool is not specified, 'git-difftool'
37
will use the configuration variable `diff.tool`. If the
Documentation/git-mergetool.txt
+1
-1
@@ -27,7 +27,7 @@ OPTIONS
27
Use the merge resolution program specified by <tool>.
28
Valid merge tools are:
29
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
30
- diffuse, tortoisemerge and opendiff
30
+ diffuse, tortoisemerge, opendiff and araxis.
31
+
32
If a merge resolution program is not specified, 'git-mergetool'
33
will use the configuration variable `merge.tool`. If the
Documentation/merge-config.txt
+1
-1
@@ -23,7 +23,7 @@ merge.tool::
23
Controls which merge resolution program is used by
24
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
25
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
26
- "diffuse", "ecmerge", "tortoisemerge", and
26
+ "diffuse", "ecmerge", "tortoisemerge", "araxis", and
27
"opendiff". Any other value is treated is custom merge tool
28
and there must be a corresponding mergetool.<tool>.cmd option.
29
contrib/completion/git-completion.bash
+1
-1
@@ -911,7 +911,7 @@ _git_diff ()
911
}
912
913
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
914
- tkdiff vimdiff gvimdiff xxdiff
914
+ tkdiff vimdiff gvimdiff xxdiff araxis
915
"
916
917
_git_difftool ()
git-mergetool--lib.sh
+23
-2
@@ -18,6 +18,9 @@ translate_merge_tool_path () {
18
emerge)
19
echo emacs
20
;;
21
+ araxis)
22
+ echo compare
23
+ ;;
24
*)
25
echo "$1"
26
;;
@@ -43,7 +46,7 @@ check_unchanged () {
46
valid_tool () {
47
case "$1" in
48
kdiff3 | tkdiff | xxdiff | meld | opendiff | \
46
- emerge | vimdiff | gvimdiff | ecmerge | diffuse)
49
+ emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)
50
;; # happy
51
tortoisemerge)
52
if ! merge_mode; then
@@ -263,6 +266,24 @@ run_merge_tool () {
266
status=1
267
fi
268
;;
269
+ araxis)
270
+ if merge_mode; then
271
+ touch "$BACKUP"
272
+ if $base_present; then
273
+ "$merge_tool_path" -wait -merge -3 -a1 \
274
+ "$BASE" "$LOCAL" "$REMOTE" "$MERGED" \
275
+ >/dev/null 2>&1
276
+ else
277
+ "$merge_tool_path" -wait -2 \
278
+ "$LOCAL" "$REMOTE" "$MERGED" \
279
+ >/dev/null 2>&1
280
+ fi
281
+ check_unchanged
282
+ else
283
+ "$merge_tool_path" -wait -2 "$LOCAL" "$REMOTE" \
284
+ >/dev/null 2>&1
285
+ fi
286
+ ;;
287
*)
288
merge_tool_cmd="$(get_merge_tool_cmd "$1")"
289
if test -z "$merge_tool_cmd"; then
@@ -302,7 +323,7 @@ guess_merge_tool () {
323
else
324
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
325
fi
305
- tools="$tools gvimdiff diffuse ecmerge"
326
+ tools="$tools gvimdiff diffuse ecmerge araxis"
327
fi
328
if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then
329
# $EDITOR is emacs so add emerge as a candidate