Re: [PATCH 4/4] git-difftool: use git-mergetool--lib for "--tool-help"
- From
John Keeping <john@keeping.me.uk>
- Date
- Jan 25, 2013, 09:19 UTC
- Message-ID
- <20130125091918.GV7498@serenity.lan>
- In-Reply-To
- <CAJDDKr4ZpQr029FW0v8LzwvhXZYmvAONbbZNuOq_E=Q1UzufvA@mail.gmail.com>
On Thu, Jan 24, 2013 at 09:29:58PM -0800, David Aguilar wrote:
Show 19 quoted lines
> On Thu, Jan 24, 2013 at 11:55 AM, John Keeping <john@keeping.me.uk> wrote: > > The "--tool-help" option to git-difftool currently displays incorrect > > output since it uses the names of the files in > > "$GIT_EXEC_PATH/mergetools/" rather than the list of command names in > > git-mergetool--lib. > > > > Fix this by simply delegating the "--tool-help" argument to the > > show_tool_help function in git-mergetool--lib. > > Very nice. > > One thought I had was that the unified show_tool_help should > probably check TOOL_MODE=diff and skip over the > !can_diff entries. > > The current output of "git difftool --tool-help" before your > patches has the problem that it will list tools such as > "tortoisemerge" as "valid but not available" because it > does not differentiate between missing and !can_diff.
list_merge_tool_candidates does this for us, so it should Just Work since we use that to generate the list of tools that we loop over.
John