Re: mergetool: include custom tools in '--tool-help'
From: John Keeping <hidden>
Date: 2016-06-15 22:55:55
On Sun, Jan 27, 2013 at 10:03:19AM -0800, Junio C Hamano wrote:
John Keeping [off-list ref] writes:quoted
'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