summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-20 22:49:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-21 18:25:30 (GMT)
commitf13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6 (patch)
treed3df13f1d784d7b1796a469900a7cb7928f96ae5
parent3c2dc76f015b4d52ef02a08c59a4546d00b475e1 (diff)
downloadgit-f13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6.zip
git-f13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6.tar.gz
git-f13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6.tar.bz2
mergetool: rename bc3 to bc
Beyond Compare version 4 works the same way as version 3, so rename the existing "bc3" adaptor to just "bc", while keeping "bc3" as a backward compatible wrapper. Noticed-by: Olivier Croquette <ocroquette@free.fr> Helped-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/completion/git-completion.bash2
-rw-r--r--git-mergetool--lib.sh2
-rw-r--r--mergetools/bc25
-rw-r--r--mergetools/bc326
4 files changed, 28 insertions, 27 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 06bf262..8a19b3e 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1207,7 +1207,7 @@ _git_diff ()
}
__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
- tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
+ tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc codecompare
"
_git_difftool ()
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index c45a020..a40d3df 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -250,7 +250,7 @@ list_merge_tool_candidates () {
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
fi
tools="$tools gvimdiff diffuse diffmerge ecmerge"
- tools="$tools p4merge araxis bc3 codecompare"
+ tools="$tools p4merge araxis bc codecompare"
fi
case "${VISUAL:-$EDITOR}" in
*vim*)
diff --git a/mergetools/bc b/mergetools/bc
new file mode 100644
index 0000000..b6319d2
--- /dev/null
+++ b/mergetools/bc
@@ -0,0 +1,25 @@
+diff_cmd () {
+ "$merge_tool_path" "$LOCAL" "$REMOTE"
+}
+
+merge_cmd () {
+ 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
+}
+
+translate_merge_tool_path() {
+ if type bcomp >/dev/null 2>/dev/null
+ then
+ echo bcomp
+ else
+ echo bcompare
+ fi
+}
diff --git a/mergetools/bc3 b/mergetools/bc3
index b6319d2..5d8dd48 100644
--- a/mergetools/bc3
+++ b/mergetools/bc3
@@ -1,25 +1 @@
-diff_cmd () {
- "$merge_tool_path" "$LOCAL" "$REMOTE"
-}
-
-merge_cmd () {
- 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
-}
-
-translate_merge_tool_path() {
- if type bcomp >/dev/null 2>/dev/null
- then
- echo bcomp
- else
- echo bcompare
- fi
-}
+. "$MERGE_TOOLS_DIR/bc"