From: David Aguilar <davvid@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] mergetools: add vimdiff3 mode
Date: Mon, 21 Apr 2014 22:01:43 -0700 [thread overview]
Message-ID: <20140422050142.GB60610@gmail.com> (raw)
In-Reply-To: <1398039860-31420-1-git-send-email-felipe.contreras@gmail.com>
On Sun, Apr 20, 2014 at 07:24:20PM -0500, Felipe Contreras wrote:
> 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.
This is a nice addition, thanks.
FWIW,
Acked-by: David Aguilar <davvid@gmail.com>
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>
> How a conflict looks:
> http://felipec.org/vimdiff3-conflict.png
>
> How it looks resolved:
> http://felipec.org/vimdiff3-resolved.png
>
> mergetools/gvimdiff3 | 1 +
> mergetools/vimdiff | 14 ++++++++++++--
> mergetools/vimdiff3 | 1 +
> 3 files changed, 14 insertions(+), 2 deletions(-)
> create mode 100644 mergetools/gvimdiff3
> create mode 100644 mergetools/vimdiff3
>
> diff --git a/mergetools/gvimdiff3 b/mergetools/gvimdiff3
> new file mode 100644
> index 0000000..04a5bb0
> --- /dev/null
> +++ b/mergetools/gvimdiff3
> @@ -0,0 +1 @@
> +. "$MERGE_TOOLS_DIR/vimdiff"
> diff --git a/mergetools/vimdiff b/mergetools/vimdiff
> index 39d0327..1ddfbfc 100644
> --- a/mergetools/vimdiff
> +++ b/mergetools/vimdiff
> @@ -20,16 +20,26 @@ merge_cmd () {
> "$merge_tool_path" -f -d -c 'wincmd l' \
> "$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
> check_unchanged
> }
>
> translate_merge_tool_path() {
> case "$1" in
> - gvimdiff|gvimdiff2)
> + gvimdiff|gvimdiff2|gvimdiff3)
> echo gvim
> ;;
> - vimdiff|vimdiff2)
> + vimdiff|vimdiff2|vimdiff3)
> echo vim
> ;;
> esac
> diff --git a/mergetools/vimdiff3 b/mergetools/vimdiff3
> new file mode 100644
> index 0000000..04a5bb0
> --- /dev/null
> +++ b/mergetools/vimdiff3
> @@ -0,0 +1 @@
> +. "$MERGE_TOOLS_DIR/vimdiff"
> --
> 1.9.2+fc1.1.g5c924db
--
David
next prev parent reply other threads:[~2014-04-22 5:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 0:24 [PATCH] mergetools: add vimdiff3 mode Felipe Contreras
2014-04-22 5:01 ` David Aguilar [this message]
2014-04-22 17:30 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140422050142.GB60610@gmail.com \
--to=davvid@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).