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

Re: [PATCH 4/4] archive: use parseopt for local-only options

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2009, 20:20 UTC
Message-ID
<7v3adnlqby.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<49B40CC1.2090906@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> The parseopt parser allows multiple occurrences of --remote and --exec
> unlike the previous one; the one specified last wins.  This looseness
> is acceptable, I think.
I agree.

If we care about this very deeply, we can add "this option is supposed to be singleton" option to the parse_options infrastructure. Besides, the "last one wins" rule is often more convenient than "there has to be at most one" rule in real life.

Previous: René Scharfe
Message 13 of 13 in “What's in git.git (Mar 2009, #02; Thu, 05)”
  1. Junio C HamanoMar 5, 2009
  2. René ScharfeMar 7, 2009
  3. 1/4 parseopt: add PARSE_OPT_KEEP_UNKNOWNRené Scharfe, Mar 8, 2009
  4. Junio C HamanoMar 8, 2009
  5. Junio C HamanoMar 8, 2009
  6. 5/4 parseopt: document KEEP_ARGV0, KEEP_UNKNOWN, NO_INTERNAL_HELPRené Scharfe, Mar 9, 2009
  7. 6/4 parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used togetherRené Scharfe, Mar 9, 2009
  8. 2/4 parseopt: add PARSE_OPT_NO_INTERNAL_HELPRené Scharfe, Mar 8, 2009
  9. 3/4 parseopt: make usage optionalRené Scharfe, Mar 8, 2009
  10. Junio C HamanoMar 8, 2009
  11. René ScharfeMar 9, 2009
  12. 4/4 archive: use parseopt for local-only optionsRené Scharfe, Mar 8, 2009
  13. Junio C HamanoMar 8, 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.