Skip to content

Commit 1bbc820

Browse files
committed
Merge branch 'da/araxis-mergetool'
* da/araxis-mergetool: mergetool--lib: add support for araxis merge
2 parents b836490 + b6f0621 commit 1bbc820

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

Documentation/git-difftool.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ OPTIONS
3131
Use the diff tool specified by <tool>.
3232
Valid merge tools are:
3333
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
34-
ecmerge, diffuse and opendiff
34+
ecmerge, diffuse, opendiff and araxis.
3535
+
3636
If a diff tool is not specified, 'git-difftool'
3737
will use the configuration variable `diff.tool`. If the

Documentation/git-mergetool.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ OPTIONS
2727
Use the merge resolution program specified by <tool>.
2828
Valid merge tools are:
2929
kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
30-
diffuse, tortoisemerge and opendiff
30+
diffuse, tortoisemerge, opendiff and araxis.
3131
+
3232
If a merge resolution program is not specified, 'git-mergetool'
3333
will use the configuration variable `merge.tool`. If the

Documentation/merge-config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ merge.tool::
2323
Controls which merge resolution program is used by
2424
linkgit:git-mergetool[1]. Valid built-in values are: "kdiff3",
2525
"tkdiff", "meld", "xxdiff", "emerge", "vimdiff", "gvimdiff",
26-
"diffuse", "ecmerge", "tortoisemerge", and
26+
"diffuse", "ecmerge", "tortoisemerge", "araxis", and
2727
"opendiff". Any other value is treated is custom merge tool
2828
and there must be a corresponding mergetool.<tool>.cmd option.
2929

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ _git_diff ()
927927
}
928928

929929
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
930-
tkdiff vimdiff gvimdiff xxdiff
930+
tkdiff vimdiff gvimdiff xxdiff araxis
931931
"
932932

933933
_git_difftool ()

git-mergetool--lib.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ translate_merge_tool_path () {
1818
emerge)
1919
echo emacs
2020
;;
21+
araxis)
22+
echo compare
23+
;;
2124
*)
2225
echo "$1"
2326
;;
@@ -43,7 +46,7 @@ check_unchanged () {
4346
valid_tool () {
4447
case "$1" in
4548
kdiff3 | tkdiff | xxdiff | meld | opendiff | \
46-
emerge | vimdiff | gvimdiff | ecmerge | diffuse)
49+
emerge | vimdiff | gvimdiff | ecmerge | diffuse | araxis)
4750
;; # happy
4851
tortoisemerge)
4952
if ! merge_mode; then
@@ -263,6 +266,24 @@ run_merge_tool () {
263266
status=1
264267
fi
265268
;;
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+
;;
266287
*)
267288
merge_tool_cmd="$(get_merge_tool_cmd "$1")"
268289
if test -z "$merge_tool_cmd"; then
@@ -302,7 +323,7 @@ guess_merge_tool () {
302323
else
303324
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
304325
fi
305-
tools="$tools gvimdiff diffuse ecmerge"
326+
tools="$tools gvimdiff diffuse ecmerge araxis"
306327
fi
307328
if echo "${VISUAL:-$EDITOR}" | grep emacs > /dev/null 2>&1; then
308329
# $EDITOR is emacs so add emerge as a candidate

0 commit comments

Comments
 (0)