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

Re: [PATCH] difftool: print list of valid tools with '--tool-help'

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2012, 19:48 UTC
Message-ID
<7vzkb7rtd0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAFouethYEmY7g3Uw0HfFMOKFNcBv=TyAsSyEkBU-cQrhaf6v7g@mail.gmail.com>
Tim Henigan <tim.henigan@gmail.com> writes:
Show 8 quoted lines
> Rather than create a new entry point, I used the existing
> 'get_merge_tool_path' that resides in 'git-mergetool--lib' to
> determine if a given tool is actually installed on the system.
>
> The '$DISPLAY' variable is lost in this implementation, but honestly I
> don't understand how it was intended to be used.
>
> Does this look useful?
Sounds like a better way to do it.

The point of checking DISPLAY in "cando" is to allow for a tool that changes its behaviour when launched in terminal-only vs windowed environment. For example, if somebody tries to spawn a tool that *only* works in windowed environment (e.g. "kompare") in a terminal-only session, it would fail, and the "cando" mechanism was designed to allow a tool detect such a situation and excuse itself from the available tools list.

I think get_merge_tool_path could do the same thing (i.e. report "no executable available to run this tool" when appropriate), so I do not think you lost anything.

Previous: Tim HeniganNext: Tim Henigan
Message 6 of 7 in “difftool: print list of valid tools with '--tool-help'”
  1. difftool: print list of valid tools with '--tool-help'Tim Henigan, Mar 15, 2012
  2. Junio C HamanoMar 15, 2012
  3. David AguilarMar 17, 2012
  4. Junio C HamanoMar 15, 2012
  5. Tim HeniganMar 23, 2012
  6. Junio C HamanoMar 23, 2012
  7. 9/9 difftool: print list of valid tools with '--tool-help'Tim Henigan, Mar 26, 2012

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.