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

From: John Keeping <[email-masked]>
Date: Sun, 27 Jan 2013 19:56:18 +0000

On Sun, Jan 27, 2013 at 10:03:19AM -0800, Junio C Hamano wrote:
> John Keeping <[email-masked]> 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