summaryrefslogtreecommitdiff
path: root/git-mergetool--lib.sh
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2011-02-27 12:32:46 +0100
committerJunio C Hamano <gitster@pobox.com>2011-02-28 12:42:38 -0800
commitffe6dc081aa23d56e6306d143d99ca508db38c5e (patch)
tree12e864eedadf5382d26d770786791d3cdeab30a7 /git-mergetool--lib.sh
parentaa03f60463129194d328035f9974be4fa951dd44 (diff)
downloadgit-ffe6dc081aa23d56e6306d143d99ca508db38c5e.tar.gz
mergetool--lib: Add Beyond Compare 3 as a tool
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Tested-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r--git-mergetool--lib.sh22
1 files changed, 20 insertions, 2 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index efca09f51f..eeefb9c299 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -13,6 +13,9 @@ translate_merge_tool_path () {
araxis)
echo compare
;;
+ bc3)
+ echo bcompare
+ ;;
emerge)
echo emacs
;;
@@ -46,7 +49,7 @@ check_unchanged () {
valid_tool () {
case "$1" in
- araxis | diffuse | ecmerge | emerge | gvimdiff | gvimdiff2 | \
+ araxis | bc3 | diffuse | ecmerge | emerge | gvimdiff | gvimdiff2 | \
kdiff3 | meld | opendiff | p4merge | tkdiff | vimdiff | vimdiff2 | xxdiff)
;; # happy
kompare)
@@ -106,6 +109,21 @@ run_merge_tool () {
>/dev/null 2>&1
fi
;;
+ bc3)
+ if merge_mode; then
+ touch "$BACKUP"
+ if $base_present; then
+ "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
+ -mergeoutput="$MERGED"
+ else
+ "$merge_tool_path" "$LOCAL" "$REMOTE" \
+ -mergeoutput="$MERGED"
+ fi
+ check_unchanged
+ else
+ "$merge_tool_path" "$LOCAL" "$REMOTE"
+ fi
+ ;;
diffuse)
if merge_mode; then
touch "$BACKUP"
@@ -342,7 +360,7 @@ guess_merge_tool () {
else
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
fi
- tools="$tools gvimdiff diffuse ecmerge p4merge araxis"
+ tools="$tools gvimdiff diffuse ecmerge p4merge araxis bc3"
fi
case "${VISUAL:-$EDITOR}" in
*vim*)