git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: pudinha <rogi@skylittlesystem.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Support nvim as mergetool
Date: Sat, 18 Jul 2020 13:30:40 -0700	[thread overview]
Message-ID: <xmqqd04sbm6n.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200718192001.27434-1-rogi@skylittlesystem.org> (pudinha's message of "Sat, 18 Jul 2020 20:20:02 +0100")

pudinha <rogi@skylittlesystem.org> writes:

> ---
> Hello giters! Hope you are well!
>
> I made this little patch to support nvim as a merge tool. What do you
> think?

Uninspiring.

But that is not your fault.  

The way vimdiff, vimdiff2 and vimdiff3 waste one file for each just
to have a different name is simply bad, and the way it was extended
to cover gvimdiff family is even more horrible.  This patch makes
the existing mess even worse.  That part is your fault, I'd have to
say.

I'd rather see us explore ways to improve the current arrangement
used to support these 6 variants before adding yet another 3 new
ones.

For example, we could add another method the backends could define,
call it list_tool_variants, and whenever the control flow goes from
run_merge_tool through setup_tool for a tool whose name ends with
[1-9], e.g. "foomerge3", we first see if there is "foomerge" tool
and if there is ask it if it knows about "foomerge3" variant by
calling its list_tool_variants.

That way, we probably can remove the files for vimdiff2, vimdiff3,
gvimdiff2 and gvimdiff3 (gvimdiff needs to stay there, as we do not
want to make the name derivation rule too complex) only to hold a
single line ". vimdiff".  Then the next person who adds yet another
set of backends based on a yet another reimplementation or skin of
vim would only have to add a single file in mergetools/ directory,
not three.

Hmm?

  reply	other threads:[~2020-07-18 20:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 19:20 [PATCH] Support nvim as mergetool pudinha
2020-07-18 20:30 ` Junio C Hamano [this message]
2020-07-19  4:23 ` [PATCH v2 0/2] Support nvim as merge tool pudinha
2020-07-29 21:31   ` [PATCH v3 0/2] mergetools: add support for nvimdiff (neovim) family pudinha
2020-07-29 21:31     ` [PATCH v3 1/2] mergetool--lib: improve support for vimdiff-style tool variants pudinha
2020-07-29 21:31     ` [PATCH v3 2/2] mergetools: add support for nvimdiff (neovim) family pudinha
2020-07-19  4:23 ` [PATCH v2 1/2] Refactor vimdiff and bc merge tool variants pudinha
2020-07-20 18:51   ` Junio C Hamano
2020-07-19  4:23 ` [PATCH v2 2/2] Support nvim as merge tool pudinha
2020-07-20 18:52   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqd04sbm6n.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rogi@skylittlesystem.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).