Re: mergetool: include custom tools in '--tool-help'
- From
David Aguilar <davvid@gmail.com>
- Date
- Jan 27, 2013, 21:10 UTC
- Message-ID
- <CAJDDKr5s=XS1m2rvBhibwEc8KNJswPJhb1arY0nhf4vZO56z6g@mail.gmail.com>
- In-Reply-To
- <7vmwvuv0ya.fsf@alter.siamese.dyndns.org>
On Sun, Jan 27, 2013 at 12:13 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> John Keeping <john@keeping.me.uk> writes: > >> 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 > > That is fine by me, but the real users of mergetool please feel free > to raise objections.
This seems pretty useful.
I did a bit of refactoring last night that I'd like to post here, the end result being something that's plugged into Documentation/.
I think what I did may also help add this functionality, and could be useful to build upon.
I'll send my patches shortly so you can take a look. Basically, I added a simple way to loop over the tools and filter them. This is reused in show_tool_help() and Documentation/Makefile.
The refactoring changes how show_tool_help() works, so I'd like you to take a look before we add a new feature since it might make it easier to do.
-- David