From: Dan McGee Date: Wed, 15 Sep 2010 02:21:43 +0000 (-0500) Subject: mergetool-lib: add a three-way diff view for vim/gvim X-Git-Tag: v1.7.4-rc0~166^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=829ef383a2b03a614d7d23e575270f2b10a805c1;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index f9a51ba50..b84ac582f 100644 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -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" \