Merge branch 'aw/gc-lockfile-fscanf-fix' into maint
[git] / mergetools / tortoisemerge
1 can_diff () {
2         return 1
3 }
4
5 merge_cmd () {
6         if $base_present
7         then
8                 basename="$(basename "$merge_tool_path" .exe)"
9                 if test "$basename" = "tortoisegitmerge"
10                 then
11                         "$merge_tool_path" \
12                                 -base "$BASE" -mine "$LOCAL" \
13                                 -theirs "$REMOTE" -merged "$MERGED"
14                 else
15                         "$merge_tool_path" \
16                                 -base:"$BASE" -mine:"$LOCAL" \
17                                 -theirs:"$REMOTE" -merged:"$MERGED"
18                 fi
19         else
20                 echo "$merge_tool_path cannot be used without a base" 1>&2
21                 return 1
22         fi
23 }
24
25 translate_merge_tool_path() {
26         if type tortoisegitmerge >/dev/null 2>/dev/null
27         then
28                 echo tortoisegitmerge
29         else
30                 echo tortoisemerge
31         fi
32 }