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

Re: [PATCH 2/3] parse-options: add PARSE_OPT_CUSTOM_ARGH for complicated argh's

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2009, 07:57 UTC
Message-ID
<7vmy9aetc8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4A11096B.8020208@gmail.com>
Stephen Boyd <bebarino@gmail.com> writes:
> This description sounds nice ;) Is PARSE_OPT_CUSTOM_ARGH a good name? I
> was thinking maybe PARSE_OPT_MULTARGS is better?

You are asking a wrong person. I am terrible at naming things; think "rerere" ;-).

But I think custom-arghelp is much better than multargs. You are asking "use this help for argument value _literally_", so another possibility perhaps is PARSE_OPT_ARGHELP_LITERAL.

After all, there probably are many other valid reasons why you may not want "s/.*/<&>/" blindly applied to your string. One reason may be because the string describes multiple arguments, but I suspect that it is not the only one. It is better to name the option after what it does, than naming it after one sample reason why you might want to use that option.

>> Please update Documentation/technical/api-parse-options.txt as well.
>
> There's no documentation on the flags yet, but I suppose I could add that.
Thanks.
Previous: Stephen BoydNext: Stephen Boyd
Message 6 of 9 in “show-branch: Fix die message in parse_reflog_param()”
  1. 1/3 show-branch: Fix die message in parse_reflog_param()Stephen Boyd, May 17, 2009
  2. 2/3 parse-options: add PARSE_OPT_CUSTOM_ARGH for complicated argh'sStephen Boyd, May 17, 2009
  3. 3/3 show-branch: migrate to parse-options APIStephen Boyd, May 17, 2009
  4. Junio C HamanoMay 18, 2009
  5. Stephen BoydMay 18, 2009
  6. Junio C HamanoMay 18, 2009
  7. Stephen BoydMay 18, 2009
  8. Jakub NarebskiMay 18, 2009
  9. Sverre RabbelierMay 19, 2009

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.