Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org,  herroyalpriestess@gmail.com
Subject: Re: [PATCH v3] api-parse-options: add missing flags and macros
Date: Mon, 09 Nov 2026 10:59:39 -0800	[thread overview]
Message-ID: <xmqqse19zv8k.fsf@gitster.g> (raw)
In-Reply-To: <20261109-kn-parse-options-doc-v3-1-e60022942721@gmail.com> (Karthik Nayak's message of "Mon, 09 Nov 2026 12:30:10 +0100")

Karthik Nayak <karthik.188@gmail.com> writes:

> The 'Documentation/technical/api-parse-options.adoc' contains
> documentation around the parse-options API. The document is missing some
> of the macros and flags provided by the API.
>
> Add the missing flags 'PARSE_OPT_ONE_SHOT' and 'PARSE_OPT_SHELL_EVAL' to
> the documentation. While 'PARSE_OPT_ONE_SHOT' was introduced in
> 202fbb3315 (parse-options: add one-shot mode, 2019-01-27) as a temporary
> flag, it is now 7 years and still exists. So let's document it, as when
> the time comes, it is always easy to remove the same.
>
> Also add the following missing macros:
>   - OPT__SUPER_PREFIX
>   - OPT__VERBOSITY
>   - OPT_BITOP
>   - OPT_STRVEC
>   - OPT_UYN
>   - OPT_NOOP_ARG
>   - OPT_COLUMN
>   - OPT_CONTAINS
>   - OPT_NO_CONTAINS
>   - OPT_WITH
>   - OPT_WITHOUT
>   - OPT_CLEANUP
>   - OPT_PATHSPEC_FROM_FILE
>   - OPT_PATHSPEC_FILE_NUL
>   - OPT_AUTOSTASH
>   - OPT_DIFF_UNIFIED
>   - OPT_DIFF_INTERHUNK_CONTEXT
>   - OPT_IPVERSION
>   - OPT_ALIAS
>
> This brings the technical documentation in line with the code in
> 'parse-options.h'.
>
> While here, add the missing `flags` argument to `OPT__FORCE`.
>
> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
> ---
> I was reading the docs while reviewing another series and ended
> up finding some missing documentation. This patch tries to cover
> that. Some of these might be options/flags we rarely use, but I
> strongly feel its easier to make choices when there is adequate
> documentation.
> ---
> Changes in v3:
> - Fix typo and rename the variable

OK.  Matching the parameters of OPT_ALIAS() the documentation uses
to what is actually used in parse-options.h header makes sense.

Have we reached the point of diminishing returns now?

Thanks.

  reply	other threads:[~2026-11-09 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 10:31 [PATCH] api-parse-options: add missing flags and macros Karthik Nayak
2026-11-05 12:25 ` Cynthia Uche
2026-11-05 13:56   ` Karthik Nayak
2026-11-05 21:35     ` Cynthia Uche
2026-11-06  8:50 ` [PATCH v2] " Karthik Nayak
2026-11-06 19:53   ` Cynthia Uche
2026-11-09 11:30     ` Karthik Nayak
2026-11-09 11:30 ` [PATCH v3] " Karthik Nayak
2026-11-09 18:59   ` Junio C Hamano [this message]
2026-11-10 13:15     ` Karthik Nayak

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=xmqqse19zv8k.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=herroyalpriestess@gmail.com \
    --cc=karthik.188@gmail.com \
    /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