Skip to content

Commit eeaf4e7

Browse files
committed
Merge branch 'ss/mergetools-tortoise'
Update mergetools to work better with newer merge helper tortoise ships. * ss/mergetools-tortoise: mergetools: teach tortoisemerge to handle filenames with SP correctly mergetools: support TortoiseGitMerge
2 parents 55f56fe + 81ed7b9 commit eeaf4e7

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

mergetools/tortoisemerge

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,29 @@ merge_cmd () {
66
if $base_present
77
then
88
touch "$BACKUP"
9-
"$merge_tool_path" \
10-
-base:"$BASE" -mine:"$LOCAL" \
11-
-theirs:"$REMOTE" -merged:"$MERGED"
9+
basename="$(basename "$merge_tool_path" .exe)"
10+
if test "$basename" = "tortoisegitmerge"
11+
then
12+
"$merge_tool_path" \
13+
-base "$BASE" -mine "$LOCAL" \
14+
-theirs "$REMOTE" -merged "$MERGED"
15+
else
16+
"$merge_tool_path" \
17+
-base:"$BASE" -mine:"$LOCAL" \
18+
-theirs:"$REMOTE" -merged:"$MERGED"
19+
fi
1220
check_unchanged
1321
else
14-
echo "TortoiseMerge cannot be used without a base" 1>&2
22+
echo "$merge_tool_path cannot be used without a base" 1>&2
1523
return 1
1624
fi
1725
}
26+
27+
translate_merge_tool_path() {
28+
if type tortoisegitmerge >/dev/null 2>/dev/null
29+
then
30+
echo tortoisegitmerge
31+
else
32+
echo tortoisemerge
33+
fi
34+
}

0 commit comments

Comments
 (0)