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

Re: [PATCHv2 2/2] parse-options: simplify usage argh handling

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jun 6, 2009, 10:30 UTC
Message-ID
<4A2A453B.7060202@lsrfire.ath.cx>
In-Reply-To
<1244159037-9292-2-git-send-email-bebarino@gmail.com>
Stephen Boyd schrieb:
Show 19 quoted lines
> Simplify the argh printing by simply calling usage_argh() if the option
> can take an argument. Update macros defined in parse-options.h to set
> the PARSE_OPT_NOARG flag.
> 
> The only other user of custom non-argument taking options is git-apply
> (in this case OPTION_BOOLEAN for deprecated options). Update it to set
> the PARSE_OPT_NOARG flag.
> 
> Thanks to René Scharfe for the suggestion and starter patch.
> 
> Signed-off-by: Stephen Boyd <bebarino@gmail.com>
> ---
> 
> René, feel free to signoff if you like.
> 
>  builtin-apply.c |    6 ++++--
>  parse-options.c |   33 ++++-----------------------------
>  parse-options.h |   20 +++++++++++++-------
>  3 files changed, 21 insertions(+), 38 deletions(-)
Looks good, thanks.  The output of this command:
	$ for c in ./git-*; do $c --help-all </dev/null; done

didn't change, except for git-send-email reporting a different temporary file name (unrelated to this patch, of course).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Previous: Stephen Boyd
Message 7 of 7 in “parse-options: make OPT_NUMBER's argh explicit”
  1. parse-options: make OPT_NUMBER's argh explicitStephen Boyd, Jun 3, 2009
  2. René ScharfeJun 3, 2009
  3. Stephen BoydJun 3, 2009
  4. René ScharfeJun 3, 2009
  5. 1/2 parse-options: make OPT_INTEGER's argh explicitStephen Boyd, Jun 4, 2009
  6. 2/2 parse-options: simplify usage argh handlingStephen Boyd, Jun 4, 2009
  7. René ScharfeJun 6, 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.