Merge branch 'nd/ita-cleanup' into maint
[git] / mergetools / vimdiff
1 diff_cmd () {
2         "$merge_tool_path" -R -f -d \
3                 -c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
4 }
5
6 merge_cmd () {
7         touch "$BACKUP"
8         case "$1" in
9         gvimdiff|vimdiff)
10                 if $base_present
11                 then
12                         "$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \
13                                 "$LOCAL" "$BASE" "$REMOTE" "$MERGED"
14                 else
15                         "$merge_tool_path" -f -d -c 'wincmd l' \
16                                 "$LOCAL" "$MERGED" "$REMOTE"
17                 fi
18                 ;;
19         gvimdiff2|vimdiff2)
20                 "$merge_tool_path" -f -d -c 'wincmd l' \
21                         "$LOCAL" "$MERGED" "$REMOTE"
22                 ;;
23         gvimdiff3|vimdiff3)
24                 if $base_present
25                 then
26                         "$merge_tool_path" -f -d -c 'hid | hid | hid' \
27                                 "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
28                 else
29                         "$merge_tool_path" -f -d -c 'hid | hid' \
30                                 "$LOCAL" "$REMOTE" "$MERGED"
31                 fi
32                 ;;
33         esac
34         check_unchanged
35 }
36
37 translate_merge_tool_path() {
38         case "$1" in
39         gvimdiff|gvimdiff2|gvimdiff3)
40                 echo gvim
41                 ;;
42         vimdiff|vimdiff2|vimdiff3)
43                 echo vim
44                 ;;
45         esac
46 }