Browse Source

mergetool-lib: add a three-way diff view for vim/gvim

When the base version is available, use a three-way, four panel view by
default. This shows the (local, base, remote) revisions up top and the
merged result by itself in the lower pane. All revisions will still scroll
together by default, and the cursor still defaults to the merged result edit
pane.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Dan McGee 14 years ago committed by Junio C Hamano
parent
commit
829ef383a2
  1. 9
      git-mergetool--lib.sh

9
git-mergetool--lib.sh

@ -172,8 +172,13 @@ run_merge_tool () { @@ -172,8 +172,13 @@ run_merge_tool () {
vimdiff|gvimdiff)
if merge_mode; then
touch "$BACKUP"
"$merge_tool_path" -f -d -c "wincmd l" \
"$LOCAL" "$MERGED" "$REMOTE"
if $base_present; then
"$merge_tool_path" -f -d -c "wincmd J" \
"$MERGED" "$LOCAL" "$BASE" "$REMOTE"
else
"$merge_tool_path" -f -d -c "wincmd l" \
"$LOCAL" "$MERGED" "$REMOTE"
fi
check_unchanged
else
"$merge_tool_path" -f -d -c "wincmd l" \

Loading…
Cancel
Save