Skip to content

Commit f13f9b0

Browse files
committed
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 <[email protected]> Helped-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c2dc76 commit f13f9b0

File tree

4 files changed

+28
-27
lines changed

4 files changed

+28
-27
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ _git_diff ()
12071207
}
12081208

12091209
__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
1210-
tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
1210+
tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc codecompare
12111211
"
12121212

12131213
_git_difftool ()

git-mergetool--lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ list_merge_tool_candidates () {
250250
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
251251
fi
252252
tools="$tools gvimdiff diffuse diffmerge ecmerge"
253-
tools="$tools p4merge araxis bc3 codecompare"
253+
tools="$tools p4merge araxis bc codecompare"
254254
fi
255255
case "${VISUAL:-$EDITOR}" in
256256
*vim*)

mergetools/bc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff_cmd () {
2+
"$merge_tool_path" "$LOCAL" "$REMOTE"
3+
}
4+
5+
merge_cmd () {
6+
touch "$BACKUP"
7+
if $base_present
8+
then
9+
"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
10+
-mergeoutput="$MERGED"
11+
else
12+
"$merge_tool_path" "$LOCAL" "$REMOTE" \
13+
-mergeoutput="$MERGED"
14+
fi
15+
check_unchanged
16+
}
17+
18+
translate_merge_tool_path() {
19+
if type bcomp >/dev/null 2>/dev/null
20+
then
21+
echo bcomp
22+
else
23+
echo bcompare
24+
fi
25+
}

mergetools/bc3

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1 @@
1-
diff_cmd () {
2-
"$merge_tool_path" "$LOCAL" "$REMOTE"
3-
}
4-
5-
merge_cmd () {
6-
touch "$BACKUP"
7-
if $base_present
8-
then
9-
"$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
10-
-mergeoutput="$MERGED"
11-
else
12-
"$merge_tool_path" "$LOCAL" "$REMOTE" \
13-
-mergeoutput="$MERGED"
14-
fi
15-
check_unchanged
16-
}
17-
18-
translate_merge_tool_path() {
19-
if type bcomp >/dev/null 2>/dev/null
20-
then
21-
echo bcomp
22-
else
23-
echo bcompare
24-
fi
25-
}
1+
. "$MERGE_TOOLS_DIR/bc"

0 commit comments

Comments
 (0)