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

Re: [PATCH] Make builtin-tag.c use parse_options.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 9, 2007, 14:31 UTC
Message-ID
<Pine.LNX.4.64.0711091429120.4362@racer.site>
In-Reply-To
<fh1p10$nta$1@ger.gmane.org>
Hi,
[re Cc:ing jasam]
On Fri, 9 Nov 2007, Jakub Narebski wrote:
Show 9 quoted lines
> Carlos Rica wrote:
> 
> > +     struct option options[] = {
> > +             { OPTION_STRING, 'l', NULL, &list, "pattern", "list tag names",
> > +                     PARSE_OPT_OPTARG, NULL, (intptr_t) no_pattern },
> 
> > +             OPT_STRING('F', NULL, &msgfile, "file", "message in a file"),
> 
> Does it matter that you use OPTION_STRING here and OPT_STRING macro there?

I guess it is because of the PARSE_OPT_OPTARG thing, together with no_pattern. We need to know if -l was specified, even if no argument was passed in.

Hth, Dscho

Previous: Jakub NarebskiNext: Junio C Hamano
Message 3 of 11 in “Make builtin-tag.c use parse_options.”
  1. Make builtin-tag.c use parse_options.Carlos Rica, Nov 9, 2007
  2. Jakub NarebskiNov 9, 2007
  3. Johannes SchindelinNov 9, 2007
  4. Junio C HamanoNov 10, 2007
  5. Junio C HamanoNov 10, 2007
  6. Junio C HamanoNov 10, 2007
  7. Carlos RicaNov 10, 2007
  8. Pierre HabouzitNov 10, 2007
  9. Carlos RicaNov 12, 2007
  10. Pierre HabouzitNov 12, 2007
  11. Kristian HøgsbergNov 12, 2007

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.