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

Re: [PATCH] Remove deprecated OPTION_BOOLEAN

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2013, 18:11 UTC
Message-ID
<7v4nbd1bjj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1375112281-3935-2-git-send-email-stefanbeller@googlemail.com>
Stefan Beller <stefanbeller@googlemail.com> writes:
> As of b04ba2bb4 OPTION_BOOLEAN was deprecated.

The primary purpose of b04ba2bb (parse-options: deprecate OPT_BOOLEAN, 2011-09-27) is to deprecate OPT_BOOLEAN(), which was hard to use correctly.

OPT_BOOLEAN() is not touched at all with this patch, it seems. Do they want count-up semantics?

Show 13 quoted lines
> This commit removes all occurrences of OPTION_BOOLEAN.
> In b04ba2bb4 Junio suggested to replace it with either
> OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which
> occurred often with the OPTION_BOOLEAN was a hidden boolean parameter.
> So I defined OPT_HIDDEN_BOOL as an additional possible parse option
> in parse-options.h to make life easy.
>
> The OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref.
> The only exception, where there was need to fiddle with OPTION_SET_INT
> was log and notes. However in these two files there is also a pattern,
> so we could think of introducing OPT_NONEG_BOOL.
>
> Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>

At first glance, it looked to me that OPT_HIDDEN_BOOL was a good addition, given how often we have PARSE_OPT_HIDDEN. While I think some of the hidden ones are justified, I am not sure if the hiding of many options are. If we stop hiding many of them, HIDDEN_BOOL may become not so useful. I dunno.

Previous: Stefan BellerNext: Stefan Beller
Message 3 of 7 in “Remove deprecated OPTION_BOOLEAN”
  1. Remove deprecated OPTION_BOOLEANStefan Beller, Jul 29, 2013
  2. Remove deprecated OPTION_BOOLEANStefan Beller, Jul 29, 2013
  3. Junio C HamanoJul 29, 2013
  4. Stefan BellerJul 29, 2013
  5. Junio C HamanoJul 29, 2013
  6. Stefan BellerJul 29, 2013
  7. Junio C HamanoJul 29, 2013

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.