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

Re: [PATCH 2/2] difftool: don't assume that default sh is sane

From
Charles Bailey <charles@hashpling.org>
Date
Jul 19, 2014, 18:29 UTC
Message-ID
<20140719182950.GA31037@hashpling.org>
In-Reply-To
<20140719172132.GB26927@serenity.lan>
On Sat, Jul 19, 2014 at 06:21:32PM +0100, John Keeping wrote:
Show 11 quoted lines
> 
> What's the reason for forcing `--tool-help` to be the last option?
> Wouldn't it be simpler to just change the top-level case statement to:
> 
> 	--tool-help=*)
> 		TOOL_MODE=${1#--tool-help=}
> 		show_tool_help
> 		;;
> 	--tool-help)
> 		show_tool_help
> 		;;

It doesn't make sense to use --tool-help with other parameters so issuing an error made sense to me at the time. You've pointed out to me that I don't error when those other options come first so I'm now unsure how valuable this behaviour is, now. (I can't immediately see a really neat way to give a diagnostic if other options do come first.)

Your version is good, obviously simpler.
Previous: John KeepingNext: David Aguilar
Message 4 of 6 in “mergetool: don't require a work tree for --tool-help”
  1. 1/2 mergetool: don't require a work tree for --tool-helpCharles Bailey, Jul 19, 2014
  2. 2/2 difftool: don't assume that default sh is saneCharles Bailey, Jul 19, 2014
  3. John KeepingJul 19, 2014
  4. Charles BaileyJul 19, 2014
  5. David AguilarJul 29, 2014
  6. David AguilarJul 29, 2014

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.