Merging:
my/path/filename.cs
Normal merge conflict for 'my/path/filename.cs':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (BC3):
git_path/libexec/git-core/mergetools/BC3: line 9: bcompare: command not found
my/path/filename.cs seems unchanged.
Was the merge successful? [y/n] n
Where is this line 9? It turns out that it seems MSysGit (or Git?) has put all merge tools to a folder named "git_path/libexec/git-core/mergetools/". In my installation, I can already find quite a bunch of tools:
araxis bc3 defaults deltawalker diffuse ecmerge emerge kdiff3 kompare meld opendiff p4merge tkdiff tortoisemerge vim xxdiff
and they are actually bash scripts. For example, the bc3 file is like below:
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
}
and there is really is a line 9! Of course directly modify the file will do the trick. But I guess there are better ways. After testing around, trying to override the merge_tool_path environment variable, I found it's easier if I just put BC3's folder to path, and nothing else need to be changed!