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

Re: [PATCH v2] die_for_incompatible_opts(): unbounded number of options

From
Jeff King <peff@peff.net>
Date
Aug 29, 2026, 11:15 UTC
Message-ID
<20260829111549.GB40814@coredump.intra.peff.net>
In-Reply-To
<xmqqbjana2wv.fsf@gitster.g>
On Thu, Aug 27, 2026 at 10:28:32AM -0700, Junio C Hamano wrote:
> +void die_for_incompatible_opts(bool opt1, const char *opt1_name, ...)

I'm mildly negative on this, just because there's no compiler support for making sure there is an EOF somewhere. Keeping patch 1 and using LAST_ARG_MUST_BE_NULL would be preferable, IMHO.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 13 in “die_for_incompatible_opts(): unbounded number of options”
  1. 0/2 die_for_incompatible_opts(): unbounded number of optionsJunio C Hamano, Aug 26, 2026
  2. 1/2 die_for_incompatible_optN: swap the order of argumentsJunio C Hamano, Aug 26, 2026
  3. 2/2 die_for_incompatible_opts(): accept more than four optionsJunio C Hamano, Aug 26, 2026
  4. Elijah NewrenAug 27, 2026
  5. Junio C HamanoAug 27, 2026
  6. Jeff KingAug 27, 2026
  7. Junio C HamanoAug 27, 2026
  8. Jeff KingAug 29, 2026
  9. Junio C HamanoAug 29, 2026
  10. René ScharfeAug 29, 2026
  11. die_for_incompatible_opts(): unbounded number of optionsJunio C Hamano, Aug 27, 2026
  12. Jeff KingAug 29, 2026
  13. Junio C HamanoAug 30, 2026

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.