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

Re: [PATCH] various: disallow --no-no-OPT for --no-opt options

From
René Scharfe <l.s.r@web.de>
Date
Apr 19, 2017, 13:44 UTC
Message-ID
<6d9cedc4-3d3d-61a8-080c-98126c555e1b@web.de>
In-Reply-To
<CACBZZX7Y2cqabLMkx35ZU88Y3+8zffP5hxa8haThMaErbfhcfA@mail.gmail.com>
Am 19.04.2017 um 15:19 schrieb Ævar Arnfjörð Bjarmason:
> I mean a bug in my patch, i.e. I meant to remove --no-no-OPT in cases
> of --no-OPT but also removed --OPT unintentionally, but anyway, let's
> drop this one, Jacob's patch is better.
Ah, OK.

You also wondered why no tests complained. Good question. Would it make sense to test every option *and* its negation? That would double the number of tests in order to check a parseopt feature. Hmm, not sure. More test coverage would be good, but I doubt we'd ever arrive at 100% for this.

If you had converted --no-doubt in t/helper/test-parse-options.c to OPT_BOOL_NONEG instead of or in addition to adding the new flag --no-neg then you'd seen the effect in t0040.

René
Previous: Ævar Arnfjörð Bjarmason
Message 12 of 12 in “various: disallow --no-no-OPT for --no-opt options”
  1. various: disallow --no-no-OPT for --no-opt optionsÆvar Arnfjörð Bjarmason, Apr 18, 2017
  2. René ScharfeApr 18, 2017
  3. Jeff KingApr 19, 2017
  4. Junio C HamanoApr 19, 2017
  5. Jeff KingApr 19, 2017
  6. Ævar Arnfjörð BjarmasonApr 19, 2017
  7. Jacob KellerApr 19, 2017
  8. Jeff KingApr 19, 2017
  9. Ævar Arnfjörð BjarmasonApr 19, 2017
  10. René ScharfeApr 19, 2017
  11. Ævar Arnfjörð BjarmasonApr 19, 2017
  12. René ScharfeApr 19, 2017

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.