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

Re: [PATCH] name-rev: use OPT_HIDDEN_BOOL for --peel-tag

From
René Scharfe <l.s.r@web.de>
Date
Sep 7, 2023, 20:20 UTC
Message-ID
<e4cec1b9-fb9e-3b12-355f-d4375f2da161@web.de>
In-Reply-To
<20230905071719.GF199565@coredump.intra.peff.net>
Am 05.09.23 um 09:17 schrieb Jeff King:
Show 11 quoted lines
> On Sat, Sep 02, 2023 at 08:38:34PM +0200, René Scharfe wrote:
>
> OPT_HIDDEN_BOOL() itself is a little funny to me. I guess back then we
> did not have the "_F" variants, but really it is just:
>
>   OPT_BOOL_F(0, "peel-tag", &peel_tag,
> 	     N_("dereference tags in the input (internal use)")),
> 	     PARSE_OPT_HIDDEN);
>
> which would remove one more special case (after all, being hidden is
> orthogonal to the type).
Good point!
> But there are enough of them that maybe having
> a special name for this is worth it. I dunno.

A special case just for a flag feels wasteful. _F is more general at a reasonable price of some verbosity:

	OPT_HIDDEN_BOOL(s, l, v, h),
	OPT_BOOL_F(s, l, v, h, PARSE_OPT_HIDDEN),
Hindsight..
> But we could probably simplify the definition, at least. :)
Sure, that would be some kind of consolation price.
René
Previous: Jeff King
Message 3 of 3 in “name-rev: use OPT_HIDDEN_BOOL for --peel-tag”
  1. name-rev: use OPT_HIDDEN_BOOL for --peel-tagRené Scharfe, Sep 2, 2023
  2. Jeff KingSep 5, 2023
  3. René ScharfeSep 7, 2023

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.