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

[Outreachy] column: propose using early_scan_options() for --command

From
FDFien Dora <fiendora5@gmail.com>
Date
Nov 6, 2026, 17:26 UTC
Message-ID
<CACWAS-X1EGU+esDOeym+HnLAUqyBO3nBsboPU0RTV-RF1HKDfA@mail.gmail.com>
Hello Christian, Siddharth, and the Git community,

Following my earlier contribution, t1402: test --no-allow-onelevel option precedence, I have been exploring possible follow-up work related to Git's argument-scanning and parsing improvements.

I have been studying the new early_scan_options() API, particularly its implementation in parse-options.c and its use in fast-import.

I noticed that builtin/column.c still performs a manual early check for --command= before invoking parse_options():

if (argc > 1 && starts_with(argv[1], "--command="))

This is necessary because git column uses the option's value to load configuration before normal option parsing. However, the early check recognizes only the exact --command=<name> form, whereas parse_options() also recognizes separate-value and unambiguous abbreviated forms.

I tested the current implementation and observed that •⁠ ⁠--command=branch is accepted. •⁠ ⁠--command branch and --comm=branch are rejected. •⁠ ⁠--command=branch is rejected when preceded by another option. •⁠ ⁠Repeated identical --command values are accepted, while conflicting values are rejected. I would like to propose a focused follow-up patch that replaces the manual early check with early_scan_options(), mark --command with PARSE_OPT_EARLY, and add regression tests for the relevant argument-handling behavior.

I would appreciate guidance on whether the existing first-position and attached-value restrictions should be preserved or whether the conversion should accept additional forms recognized by parse_options().

I also noticed that Cynthia Uche mentioned git column as a possible conversion target in her internship proposal. I would like to acknowledge her proposal to prevent any potential overlap before starting any implementation.

Would this be a suitable independent follow-up contribution to undertake now, or would you recommend a different target?

Thank you for your time and guidance.
Message 1 of 1 in “[Outreachy] column: propose using early_scan_options() for --command”
  1. Fien DoraNov 6, 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.