git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Jeff King <peff@peff.net>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] name-rev: use OPT_HIDDEN_BOOL for --peel-tag
Date: Thu, 7 Sep 2023 22:20:48 +0200	[thread overview]
Message-ID: <e4cec1b9-fb9e-3b12-355f-d4375f2da161@web.de> (raw)
In-Reply-To: <20230905071719.GF199565@coredump.intra.peff.net>

Am 05.09.23 um 09:17 schrieb Jeff King:
> 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é

      reply	other threads:[~2023-09-07 20:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 18:38 [PATCH] name-rev: use OPT_HIDDEN_BOOL for --peel-tag René Scharfe
2023-09-05  7:17 ` Jeff King
2023-09-07 20:20   ` René Scharfe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4cec1b9-fb9e-3b12-355f-d4375f2da161@web.de \
    --to=l.s.r@web.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).