Merge branch 'jk/read-packed-refs-without-path-max' into maint
[git] / mergetools / tortoisemerge
1 can_diff () {
2         return 1
3 }
4
5 merge_cmd () {
6         if $base_present
7         then
8                 touch "$BACKUP"
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
20                 check_unchanged
21         else
22                 echo "$merge_tool_path cannot be used without a base" 1>&2
23                 return 1
24         fi
25 }
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 }