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

Re: [PATCH v3] api-parse-options: add missing flags and macros

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2026, 18:59 UTC
Message-ID
<xmqqse19zv8k.fsf@gitster.g>
In-Reply-To
<20261109-kn-parse-options-doc-v3-1-e60022942721@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 46 quoted lines
> 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.
Previous: Karthik NayakNext: Karthik Nayak
Message 9 of 10 in “api-parse-options: add missing flags and macros”
  1. api-parse-options: add missing flags and macrosKarthik Nayak, Nov 5, 2026
  2. Cynthia UcheNov 5, 2026
  3. Karthik NayakNov 5, 2026
  4. Cynthia UcheNov 5, 2026
  5. api-parse-options: add missing flags and macrosKarthik Nayak, Nov 6, 2026
  6. Cynthia UcheNov 6, 2026
  7. Karthik NayakNov 9, 2026
  8. api-parse-options: add missing flags and macrosKarthik Nayak, Nov 9, 2026
  9. Junio C HamanoNov 9, 2026
  10. Karthik NayakNov 10, 2026

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.