Skip to content

Commit

Permalink
mergetool: rename bc3 to bc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 21, 2014
1 parent 3c2dc76 commit f13f9b0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
2 changes: 1 addition & 1 deletion git-mergetool--lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down
25 changes: 25 additions & 0 deletions mergetools/bc
Original file line number Diff line number Diff line change
@@ -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
}
26 changes: 1 addition & 25 deletions mergetools/bc3
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit f13f9b0

Please sign in to comment.