mbox series

[0/1] mergetools/vimdiff: add vimdiff1 merge tool variant

Message ID 20210214022840.849312-1-seth@eseth.com (mailing list archive)
Headers show
Series mergetools/vimdiff: add vimdiff1 merge tool variant | expand

Message

Seth House Feb. 14, 2021, 2:28 a.m. UTC
Add yet another vimdiff layout variant to present the simplest possible
two-way diff when resolving conflicts.

The name is an attempt at UNIX-style humor -- vimdiff3 opens four
buffers and vimdiff2 opens three buffers so vimdiff1 should therefore
open two buffers. It also communicates that vimdiff will be used and
fits cleanly into the existing layout variant naming. That said,
suggestions welcome if that isn't as great a fit as I think it is. :)

Seth House (1):
  mergetools/vimdiff: add vimdiff1 merge tool variant

 mergetools/vimdiff | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Philippe Blain Feb. 25, 2021, 6:45 p.m. UTC | #1
Hi Seth,

Le 2021-02-13 à 21:28, Seth House a écrit :
> Add yet another vimdiff layout variant to present the simplest possible
> two-way diff when resolving conflicts.
> 
> The name is an attempt at UNIX-style humor -- vimdiff3 opens four
> buffers and vimdiff2 opens three buffers so vimdiff1 should therefore
> open two buffers. It also communicates that vimdiff will be used and
> fits cleanly into the existing layout variant naming. That said,
> suggestions welcome if that isn't as great a fit as I think it is. :)

I like the name :P Slightly orthogonal though, when I first looked
at the output of 'git mergetool --tool-help', I was sort of confused by
vimdiff2 and vimdiff3 (and some others) because I looked for them in PATH and (of course)
could not find them, still Git was telling me they were available.

I think it would be good to add a short note about these variants somewhere
in Documentation/git-mergetool.txt. Might be in this patch, or not if you don't
feel like it...

Going further, we could even add a short (few words) description of each tool
and have that description show up in the output of  'git mergetool --tool-help',
something like this:

$ git mergetool --tool-help
'git mergetool --tool=<tool>' may be set to one of the following:
		emerge		Emacs (Emerge)
		opendiff	Apple FileMerge
		vimdiff		Vim (??)
		vimdiff2	Vim (3 panes)
		vimdiff3	Vim (4 panes)

Cheers,

Philippe.
Seth House Feb. 26, 2021, 12:29 a.m. UTC | #2
On Thu, Feb 25, 2021 at 01:45:16PM -0500, Philippe Blain wrote:
> I think it would be good to add a short note about these variants somewhere
> in Documentation/git-mergetool.txt. Might be in this patch, or not if you don't
> feel like it...
> 
> Going further, we could even add a short (few words) description of each tool
> and have that description show up in the output of  'git mergetool --tool-help',
> something like this:
> 
> $ git mergetool --tool-help
> 'git mergetool --tool=<tool>' may be set to one of the following:
> 		emerge		Emacs (Emerge)
> 		opendiff	Apple FileMerge
> 		vimdiff		Vim (??)
> 		vimdiff2	Vim (3 panes)
> 		vimdiff3	Vim (4 panes)

Great suggestions, thanks. A little explanation would be very helpful --
I've been confused by those variants too and wondered why I might want
to use one over another.

I'll roll those into this patch.
Junio C Hamano Feb. 26, 2021, 2:04 a.m. UTC | #3
Seth House <seth@eseth.com> writes:

> On Thu, Feb 25, 2021 at 01:45:16PM -0500, Philippe Blain wrote:
>> I think it would be good to add a short note about these variants somewhere
>> in Documentation/git-mergetool.txt. Might be in this patch, or not if you don't
>> feel like it...
>> 
>> Going further, we could even add a short (few words) description of each tool
>> and have that description show up in the output of  'git mergetool --tool-help',
>> something like this:
>> 
>> $ git mergetool --tool-help
>> 'git mergetool --tool=<tool>' may be set to one of the following:
>> 		emerge		Emacs (Emerge)
>> 		opendiff	Apple FileMerge
>> 		vimdiff		Vim (??)
>> 		vimdiff2	Vim (3 panes)
>> 		vimdiff3	Vim (4 panes)
>
> Great suggestions, thanks. A little explanation would be very helpful --
> I've been confused by those variants too and wondered why I might want
> to use one over another.
>
> I'll roll those into this patch.

I'd rather see it as a completely separate patch.
Seth House Feb. 26, 2021, 11:35 p.m. UTC | #4
On Thu, Feb 25, 2021 at 06:04:53PM -0800, Junio C Hamano wrote:
> Seth House <seth@eseth.com> writes:
> > I'll roll those into this patch.
> 
> I'd rather see it as a completely separate patch.

Ok, will do.

Should I roll a v2 of this patch set to include David's tested-by tag
even though there's no code changes?
Junio C Hamano Feb. 27, 2021, 1:52 a.m. UTC | #5
Seth House <seth@eseth.com> writes:

> On Thu, Feb 25, 2021 at 06:04:53PM -0800, Junio C Hamano wrote:
>> Seth House <seth@eseth.com> writes:
>> > I'll roll those into this patch.
>> 
>> I'd rather see it as a completely separate patch.
>
> Ok, will do.
>
> Should I roll a v2 of this patch set to include David's tested-by tag
> even though there's no code changes?

I think that is exactly what we have on sh/mergetools-vimdiff1 topic
branch in 'next'.

    $ git fetch
    $ git show 'origin/next^{/^mergetools/vimdiff:}'

Thanks.
Seth House Feb. 27, 2021, 2:17 a.m. UTC | #6
On Fri, Feb 26, 2021 at 05:52:22PM -0800, Junio C Hamano wrote:
> I think that is exactly what we have on sh/mergetools-vimdiff1 topic
> branch in 'next'.

Oh, whoops. Thanks! I'll get into the habit of watching 'next' more
closely.