for-each-ref: use skip_prefix instead of starts_with
[git/mjg.git] / mergetools / vimdiff
blob1ddfbfcd782d3b8d0e479cb0c5e29abce86e63c9
1 diff_cmd () {
2         "$merge_tool_path" -R -f -d \
3                 -c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
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 'wincmd J' \
13                                 "$MERGED" "$LOCAL" "$BASE" "$REMOTE"
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
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