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

[RFC PATCH 0/2] parse-options: improve early option scanning

From
AMAzuama Odinaka Maximus <azuama69@gmail.com>
Date
Nov 10, 2026, 16:13 UTC
Message-ID
<20261110161314.35213-1-azuama69@gmail.com>

This RFC series shares my progress on improving early option scanning in rev-list and exploring a reusable scanning API.

The first patch updates rev-list's early scan to account for options that consume arguments.

The second patch introduces a generic early option-scanning API with tests, as a step towards a more reusable solution.

The rev-list patch still uses an initial hardcoded option list, which I recognise is fragile based on the review feedback. I am investigating how to avoid this limitation and how best to integrate revision-option argument parsing without triggering unwanted parsing side effects.

I would appreciate feedback on the direction of this work, particularly the API design and its integration with revision option parsing.

Signed-off-by: Azuama Odinaka Maximus <azuama69@gmail.com>
Azuama Odinaka Maximus (2):
  rev-list: handle arguments in early option scan
  parse-options: add early option scanning
 builtin/rev-list.c            |  55 +++++++-
 parse-options.c               | 249 ++++++++++++++++++++++++++++++----
 parse-options.h               |  22 +++
 t/helper/test-parse-options.c | 236 ++++++++++++++++++++++++++++++++
 t/t0040-parse-options.sh      |   6 +
 t/t6022-rev-list-missing.sh   |  26 ++++
 6 files changed, 562 insertions(+), 32 deletions(-)
-- 
2.53.0
Next: Azuama Odinaka Maximus
Message 1 of 3 in “parse-options: improve early option scanning”
  1. 0/2 parse-options: improve early option scanningAzuama Odinaka Maximus, Nov 10, 2026
  2. 1/2 rev-list: handle arguments in early option scanAzuama Odinaka Maximus, Nov 10, 2026
  3. 2/2 parse-options: add early option scanningAzuama Odinaka Maximus, Nov 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.