mergetool-lib: combine vimdiff and gvimdiff run blocks
They are nearly identical outside of the foreground flag, which can safely be passed to both vim and gvim. The merge tool itself is named in $merge_tool_path. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
5879b6bbca
commit
ae69fd0481
|
@ -169,25 +169,14 @@ run_merge_tool () {
|
|||
"$merge_tool_path" "$LOCAL" "$REMOTE" | cat
|
||||
fi
|
||||
;;
|
||||
vimdiff)
|
||||
vimdiff|gvimdiff)
|
||||
if merge_mode; then
|
||||
touch "$BACKUP"
|
||||
"$merge_tool_path" -d -c "wincmd l" \
|
||||
"$merge_tool_path" -f -d -c "wincmd l" \
|
||||
"$LOCAL" "$MERGED" "$REMOTE"
|
||||
check_unchanged
|
||||
else
|
||||
"$merge_tool_path" -d -c "wincmd l" \
|
||||
"$LOCAL" "$REMOTE"
|
||||
fi
|
||||
;;
|
||||
gvimdiff)
|
||||
if merge_mode; then
|
||||
touch "$BACKUP"
|
||||
"$merge_tool_path" -d -c "wincmd l" -f \
|
||||
"$LOCAL" "$MERGED" "$REMOTE"
|
||||
check_unchanged
|
||||
else
|
||||
"$merge_tool_path" -d -c "wincmd l" -f \
|
||||
"$merge_tool_path" -f -d -c "wincmd l" \
|
||||
"$LOCAL" "$REMOTE"
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue