All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>,
	Dickson Wong <dicksonwong@gmail.com>
Subject: Re: [PATCH] mergetool: reorder vim/gvim buffers in three-way diffs
Date: Wed, 10 Feb 2016 09:45:51 -0800	[thread overview]
Message-ID: <xmqqlh6szcfk.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <56BB4BDF.3010407@drmicha.warpmail.net> (Michael J. Gruber's message of "Wed, 10 Feb 2016 15:40:31 +0100")

Michael J Gruber <git@drmicha.warpmail.net> writes:

>> Second call for help.  Any comments on this from anybody other than
>> the author that I missed to support this change?
>
> OK, applied it (on top of next), looks sane and improves the situation
> for the majority of people who read left to right, then top down and
> assign buffers 1 2 3 4 "mentally" to local base remote merge windows
> based on that. Their expectation is met now. Thanks!

Thanks.

Does this mean that I should warn in the release notes that some
existing users might get their expectation broken but we are going
ahead anyway because we think most people read left to right and
then top down?  I am OK with saying that--I just wanted to make sure
we know that it is what we are doing.

> (Also, the other vim variants don't need a corresponding change.)

A stupid question while I am here.  What are these different
variants?  When reviewing this patch for the first time I tried to
find where they are documented, but didn't spot anything.

I can see from the code that vimdiff2 variant does not do anything
special when it is doing a 3-way merge, but vimdiff3 variant does
behave differently when it has $BASE.  It does not need a change
like this because it already arranges and numbers the windows
sensibly (in other words, we can label this patch as aligning the
behaviour of vimdiff to that of vimdiff3)?

Thanks.

> Michael
>
>>>
>>>>  mergetools/vimdiff | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/mergetools/vimdiff b/mergetools/vimdiff
>>>> index 1ddfbfc..74ea6d5 100644
>>>> --- a/mergetools/vimdiff
>>>> +++ b/mergetools/vimdiff
>>>> @@ -2,22 +2,22 @@ diff_cmd () {
>>>>  	"$merge_tool_path" -R -f -d \
>>>>  		-c 'wincmd l' -c 'cd $GIT_PREFIX' "$LOCAL" "$REMOTE"
>>>>  }
>>>>  
>>>>  merge_cmd () {
>>>>  	touch "$BACKUP"
>>>>  	case "$1" in
>>>>  	gvimdiff|vimdiff)
>>>>  		if $base_present
>>>>  		then
>>>> -			"$merge_tool_path" -f -d -c 'wincmd J' \
>>>> -				"$MERGED" "$LOCAL" "$BASE" "$REMOTE"
>>>> +			"$merge_tool_path" -f -d -c '4wincmd w | wincmd J' \
>>>> +				"$LOCAL" "$BASE" "$REMOTE" "$MERGED"
>>>>  		else
>>>>  			"$merge_tool_path" -f -d -c 'wincmd l' \
>>>>  				"$LOCAL" "$MERGED" "$REMOTE"
>>>>  		fi
>>>>  		;;
>>>>  	gvimdiff2|vimdiff2)
>>>>  		"$merge_tool_path" -f -d -c 'wincmd l' \
>>>>  			"$LOCAL" "$MERGED" "$REMOTE"
>>>>  		;;
>>>>  	gvimdiff3|vimdiff3)

  reply	other threads:[~2016-02-10 17:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29  2:18 [PATCH] mergetool: reorder vim/gvim buffers in three-way diffs Dickson Wong
2016-01-29 18:45 ` Junio C Hamano
2016-02-09 22:25   ` Junio C Hamano
2016-02-10 14:40     ` Michael J Gruber
2016-02-10 17:45       ` Junio C Hamano [this message]
2016-02-11 15:44         ` Michael J Gruber
2016-02-11 16:03           ` Junio C Hamano
2016-02-11 19:24             ` Dickson Wong
2016-02-11 19:31               ` Junio C Hamano
2016-02-11 20:10                 ` Dickson Wong
2016-02-11 21:15             ` David Aguilar
2016-02-12 18:15               ` 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=xmqqlh6szcfk.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=davvid@gmail.com \
    --cc=dicksonwong@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.