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

Re: mergetool: include custom tools in '--tool-help'

From
John Keeping <john@keeping.me.uk>
Date
Jan 27, 2013, 19:56 UTC
Message-ID
<20130127195618.GS7498@serenity.lan>
In-Reply-To
<7vobgawljs.fsf@alter.siamese.dyndns.org>
On Sun, Jan 27, 2013 at 10:03:19AM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> John Keeping <john@keeping.me.uk> writes:
> 
> > 'git mergetool --tool-help' only lists builtin tools, not those that the
> > user has configured via a 'mergetool.<tool>.cmd' config value.  Fix this
> > by inspecting the tools configured in this way and adding them to the
> > available and unavailable lists before displaying them.
> 
> Although I am not a mergetool user, I would imagine that it would
> make sense to show it as available.
> 
> Just like "git help -a" lists subcommands in a way that can be easy
> to tell which ones are the standard ones and which ones are user
> customizations, this may want to give a similar distinction, though.
> I dunno.

I think I'd want to do this with a suffix if at all, so the output would be like this:

    'git mergetool --tool=<tool>' may be set to one of the following:
            araxis
            gvimdiff
            gvimdiff2
            mytool	(user-defined)
            vimdiff
            vimdiff2
    The following tools are valid, but not currently available:
            bc3
            codecompare
            deltawalker
            diffuse
            ecmerge
            emerge
            kdiff3
            meld
            opendiff
            p4merge
            tkdiff
            tortoisemerge
            xxdiff
    Some of the tools listed above only work in a windowed
    environment. If run in a terminal-only session, they will fail.

Adding more sections for the user-defined tools feels like the output would be too imposing and would make it hard to immediately identify the valid option.

John
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “mergetool: include custom tools in '--tool-help'”
  1. John KeepingJan 27, 2013
  2. Junio C HamanoJan 27, 2013
  3. John KeepingJan 27, 2013
  4. Junio C HamanoJan 27, 2013
  5. David AguilarJan 27, 2013

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.