mergetools: add vimdiff3 mode
It's similar to the default, except that the other windows are hidden. This ensures that removed/added colors are still visible on the main merge window, but the other windows not visible. Specially useful with merge.conflictstyle=diff3. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0bc85abb7a
commit
7c147b77d3
1
mergetools/gvimdiff3
Normal file
1
mergetools/gvimdiff3
Normal file
@ -0,0 +1 @@
|
|||||||
|
. "$MERGE_TOOLS_DIR/vimdiff"
|
@ -20,16 +20,26 @@ merge_cmd () {
|
|||||||
"$merge_tool_path" -f -d -c 'wincmd l' \
|
"$merge_tool_path" -f -d -c 'wincmd l' \
|
||||||
"$LOCAL" "$MERGED" "$REMOTE"
|
"$LOCAL" "$MERGED" "$REMOTE"
|
||||||
;;
|
;;
|
||||||
|
gvimdiff3|vimdiff3)
|
||||||
|
if $base_present
|
||||||
|
then
|
||||||
|
"$merge_tool_path" -f -d -c 'hid | hid | hid' \
|
||||||
|
"$LOCAL" "$REMOTE" "$BASE" "$MERGED"
|
||||||
|
else
|
||||||
|
"$merge_tool_path" -f -d -c 'hid | hid' \
|
||||||
|
"$LOCAL" "$REMOTE" "$MERGED"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
check_unchanged
|
check_unchanged
|
||||||
}
|
}
|
||||||
|
|
||||||
translate_merge_tool_path() {
|
translate_merge_tool_path() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
gvimdiff|gvimdiff2)
|
gvimdiff|gvimdiff2|gvimdiff3)
|
||||||
echo gvim
|
echo gvim
|
||||||
;;
|
;;
|
||||||
vimdiff|vimdiff2)
|
vimdiff|vimdiff2|vimdiff3)
|
||||||
echo vim
|
echo vim
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
1
mergetools/vimdiff3
Normal file
1
mergetools/vimdiff3
Normal file
@ -0,0 +1 @@
|
|||||||
|
. "$MERGE_TOOLS_DIR/vimdiff"
|
Loading…
Reference in New Issue
Block a user