🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Fien Dora Fri, 06 Nov 2026 17:26
[Outreachy] column: propose using early_scan_options() for --command
#2524
Author: Fien Dora
Date: Fri, 06 Nov 2026 17:26
49 lines
13431 bytes
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads