git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mergetool: reorder vim/gvim buffers in three-way diffs

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 11, 2016, 15:44 UTC
Message-ID
<56BCAC69.8030909@drmicha.warpmail.net>
In-Reply-To
<xmqqlh6szcfk.fsf@gitster.mtv.corp.google.com>
Junio C Hamano venit, vidit, dixit 10.02.2016 18:45:
Show 17 quoted lines
> 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.

I would claim that anyone who notices the difference in buffer numbering would be positively surprised.

Show 8 quoted lines
>> (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,
It is "vimdiff" without the base window.
Show 5 quoted lines
> 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)?
git log mergetools/vimdiff3
commit 7c147b77d34f072c40b912fafba499727921fa6e
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date:   Sun Apr 20 19:24:20 2014 -0500
    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.

I have to say I'm still not sure what it is about (even after trying it out, even with the conflictstyle config)).

In any case, the buffer numbering is not the same (it is local remote base merge) but it doesn't matter in this case because only one window is displayed, so there is no visual association.

Michael
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 12 in “mergetool: reorder vim/gvim buffers in three-way diffs”
  1. mergetool: reorder vim/gvim buffers in three-way diffsDickson Wong, Jan 29, 2016
  2. Junio C HamanoJan 29, 2016
  3. Junio C HamanoFeb 9, 2016
  4. Michael J GruberFeb 10, 2016
  5. Junio C HamanoFeb 10, 2016
  6. Michael J GruberFeb 11, 2016
  7. Junio C HamanoFeb 11, 2016
  8. Dickson WongFeb 11, 2016
  9. Junio C HamanoFeb 11, 2016
  10. Dickson WongFeb 11, 2016
  11. David AguilarFeb 11, 2016
  12. Junio C HamanoFeb 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.