Skip to content

Commit 755e8b3

Browse files
sschuberthgitster
authored andcommitted
Add Code Compare v2.80.4 as a merge / diff tool for Windows
Code Compare is a commercial file comparison tool for Windows, see http://www.devart.com/codecompare/ Version 2.80.4 added support for command line arguments preceded by a dash instead of a slash. This is required for Git for Windows because slashes in command line arguments get mangled with according to these rules: http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7a30747 commit 755e8b3

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ _git_diff ()
13191319
}
13201320

13211321
__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
1322-
tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3
1322+
tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
13231323
"
13241324

13251325
_git_difftool ()

git-mergetool--lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ guess_merge_tool () {
126126
else
127127
tools="opendiff kdiff3 tkdiff xxdiff meld $tools"
128128
fi
129-
tools="$tools gvimdiff diffuse ecmerge p4merge araxis bc3"
129+
tools="$tools gvimdiff diffuse ecmerge p4merge araxis bc3 codecompare"
130130
fi
131131
case "${VISUAL:-$EDITOR}" in
132132
*vim*)

mergetools/codecompare

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" -MF="$LOCAL" -TF="$REMOTE" -BF="$BASE" \
10+
-RF="$MERGED"
11+
else
12+
"$merge_tool_path" -MF="$LOCAL" -TF="$REMOTE" \
13+
-RF="$MERGED"
14+
fi
15+
check_unchanged
16+
}
17+
18+
translate_merge_tool_path() {
19+
if merge_mode
20+
then
21+
echo CodeMerge
22+
else
23+
echo CodeCompare
24+
fi
25+
}

0 commit comments

Comments
 (0)