🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2524

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

#2524
From: 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.
Technical Details
Message-ID: <CACWAS-X1EGU+esDOeym+HnLAUqyBO3nBsboPU0RTV-RF1HKDfA@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74705-linux-kernel-git=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74705-linux-kernel-git=dewy.ru
From: fiendora5@gmail.com (Fien Dora)
Newsgroups: linux.kernel.git
Subject: [Outreachy] column: propose using early_scan_options() for --command
Date: Fri, 6 Nov 2026 18:26:48 +0100
Organization: Usenet Network
Message-ID: <CACWAS-X1EGU+esDOeym+HnLAUqyBO3nBsboPU0RTV-RF1HKDfA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3933058"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7j3j0x7dmjdH99d9KX+5lI4Dahg= sha256:+zReSo+O3xljIVUQKN+n/2Nn8tLzRlkIOsXDL7bW6Iw=
	sha1:EE6yGKnCpOch+ieZkRaZRWS4Wgw= sha256:9JJCGdfDQIKNVynEkafPa/y0dgymo51IZUJtYUZ01hQ=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B0AAE1132B6; Fri,  6 Nov 2026 20:28:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id JbpLEuj1uv_x;
	Fri,  6 Nov 2026 20:28:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74705-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id D1EF51132B0; Fri,  6 Nov 2026 20:28:08 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7298E2E6B9; Fri,  6 Nov 2026 17:27:40 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793986057;
	b=SAGMIHHcFmpk4hqL2v7TUL5opl7I9w3nAkCCS96CY2/NjDL1PvrfO2k5ypCnTNoyqN3W
	 MkKdvKA5vN+WulY3r17/8CSohefq4ZY/FQ4OV26KEElD5UFaW0D+IrjXmqaWRXY2eKi8N
	 469i10bWyqPKZGB2N22GlJEVVd4cD+6ETbVBwmzUu2lEDVdx31GwBbefNdXSDyP3W499f
	 bhUrNwH4Fw9LJA4iLFsGuz13iBFnRFJt6UJPIfT5yPoD7oH5l+SLMlPNHT8IVsMX8FkGC
	 QqjzmsOtreSAwzykSvMGQ9782mBsBFpBcjTMsTfcmf3mae4QQh5vPzogNLbrdJYelsw==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793986057;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:From:Date:
	 X-Gm-Features:Message-ID:Subject:To:Cc:Content-Type:
	 Content-Transfer-Encoding;
	bh=PWyRvsWoxC5/mxqAHhehH8N+DRARZCHpS4VXq5ZK6dA=;
	b=n6MGJA+3aPNY4A8Ri1rbEiCCI4ld/ml6wzBVko2ARFGNgYbC1sK46/ek1NXAkwgzuHTw
	 QXBq1nhRYGPkSUbuDbDcjBRvTk8/ezo/7sHQFWluJIjfa4lN0fj1nnHMC/W85VZM56H/9
	 DbBIsHidb0/FuK69Ky82TsHjhWGZ90nIRLiO/4jkrYnGiSjErvg7uXvRAncWvt/lOR90s
	 EQlgzqoajkhreLJCXkieqQVNl8fmBNX3wWQRcxqMiC916gqq+H7gT39pF2rurPUp8gL8J
	 biDn9eXEdk6yvjfBupwcXVADj1+rJjDFasmo4tTvNjVN0JBgebJrTr3Gl25ihxzPlJQ==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lHJGXIw4;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id EB6AA606D805;
	Fri,  6 Nov 2026 17:27:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lHJGXIw4
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.44
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793986056;
	b=buFV2A9i6oPPVA206rN+f721na8UO3qmcj32gEug4Z/4UiQ7eed/HLgP5ibyznvgihQY
	 nhujIhJJrDhwRsSHnrZDXtEok5Z0puscCd340vz/g1HfW3YTF/p6izi+zPDAkqq7qlXKh
	 Vcp147n7SBZGsGi6rIXj9Rkfk24k27tvXDPExzq5yhf3YLWXRCwWm8q1QmT2PAqWW1e7U
	 EU5I7LckODJ5FBT2o5ZJxQrbZVEmWjwjET0SnfksvJ9FlTbzv1UNfcDijTAVmJudsli5j
	 e2mnjIbwXFkWYPDEdJp6ocvN6wlS+3TrmK+2uNSENe058oEMZs0uy5Md4Ls60agXqNA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793986056;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:From:Date:
	 X-Gm-Features:Message-ID:Subject:To:Cc:Content-Type:
	 Content-Transfer-Encoding;
	bh=PWyRvsWoxC5/mxqAHhehH8N+DRARZCHpS4VXq5ZK6dA=;
	b=dHVFp23SChADHwEf2NV1osv2pFFvdop8NGORWQ9S3Y/+7DUN37NqL7qT4qzceHNJ3JAC
	 qi9ukVQAi8tp3BxA1zaq0KXlbTaE5EtO0DKGSHXcHWIYPzKGL3Z6UGLeMAApbcDpB00EV
	 fE7G6SJOztlUalzJLABJgstL8DKQsQWEzd9pHCizw3V6ZeF79pyxPnf58HYjLAFbhS44t
	 7HouDuJfo0TrOYm61+Q8Xaeajs+p9hp8nJPfSU5DIPwgbBMS+I4vY4eWL2V2/ZjCtcy1w
	 ZWl+/v2XgtkxfgrvknohV6xGQWborJCnQ58exDasaBzOnPbnHwk5lkEpmuram7R2YhA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lHJGXIw4;
	arc=pass header.oldest-pass=0 smtp.remote-ip=74.125.224.44
X-Received: from mail-yx1-f44.google.com (mail-yx1-f44.google.com [74.125.224.44])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA096606A336
	for <git@vger.kernel.org>; Fri,  6 Nov 2026 17:27:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA096606A336
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx1-f44.google.com with SMTP id 956f58d0204a3-67c246c0c60so382540d50.0
        for <git@vger.kernel.org>; Fri, 06 Nov 2026 09:27:35 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1793986055; cv=none;
        d=google.com; s=arc-20260327;
        b=PeRTFRnokhalTz+14yY2Hn9knrhFouacbwi5sstASw78/KKcZJ4Fr4h+JpWENVU/vu
         XcN0PmEUyRmumGkSi9t5tsiDKquqFsclPxm7cAwJnmk3YpqZ8RZIfsTROsbyPPraNVQV
         C/EUx/It7nFrr4TY+F3GfEZI1uIHHiZqLR64ahpqnk2oybCdGpL73BnmgMM0rn7jkQ67
         MDW4HVfDBz/J58pD04TOIwxCKBdYf7M5EdZYhVXNZdTnv4TvP4DxBKK3LsVQQ40eu5OF
         1taZimRP/7bsayBoRS/1hohD40b8XyGMiCIAJF4goi028wJ7jvodIH4qY74l+JRylpuH
         b5hw==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
        h=content-transfer-encoding:cc:to:subject:message-id:date:from
         :mime-version:dkim-signature;
        bh=PWyRvsWoxC5/mxqAHhehH8N+DRARZCHpS4VXq5ZK6dA=;
        fh=fGSJMDFrkkEDNS6+QfBczVJpie+hBE0ZP2ZqquOXZKM=;
        b=Iozuw2ZOzVybNlSxVVf6g7Xn+Dfe7+VPJN8miAc2Yp2/flZEDgiyW043ksTpY2OSkL
         i930dNbWLcZi1Zd8Q752SEGyqT4Nr9qcAmBahOvy4to/5NsgAdM7CLBSuUI/81rUrAbi
         kyPnH3Qta1bJCaIXbsG4DpiB2jfwU4/XbvsLN7Z4EhbJLfsSshA8pNiB9mF+xRDq7WYz
         kjuYZmngFDbl+Yuv4uZRDrA/gqYhHib5h+kfyj91fIhD1bPHYiszF/6nEwpoAjXP8h+h
         ln1n29gIRx6glraNMgOyD9Hvzgu/esfMGM+HAi4i9t5k8MIgWw0PHBte7qT6/b2zTtfy
         gbrg==;
        darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793986055; x=1794590855; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:mime-version:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=PWyRvsWoxC5/mxqAHhehH8N+DRARZCHpS4VXq5ZK6dA=;
        b=lHJGXIw483yCmaDe/SHEm3UXR5n4C6EZLct7ww3KhUFTMscS1VdfgSy12pFYmPmvHl
         tEvnhhZJlZp41wTbjvQsTnpywiAhoWbpBgRLrC0vIAxs928Yiv/IRp+R3TjNreRg0X2x
         Px8BV1YEFtu6NtkADa3IoFQLBSF8nrLSQFQbjntgAiFrUnTmP/3ypQSqKpPcnPtpqmaC
         aWwBHh+xdNpCD/X1Z9H1g+uHcpUc8Ry/OfXpbjlEeRWvaRQ6ZrCutLB+lr0+XxFOJM4Z
         OF4MFw3rFYxxwIyNhrO/jiyIYLe4QILYfKihtHK0UCNezYuqaveXtFJE8UrPFCxTJXqJ
         sO9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793986055; x=1794590855;
        h=content-transfer-encoding:content-type:cc:to:subject:message-id
         :date:from:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=PWyRvsWoxC5/mxqAHhehH8N+DRARZCHpS4VXq5ZK6dA=;
        b=JOrBgb5kU8ws/2K8blYFCQT82oMamgSROQS817eBaHdZPSFmbPvKqVplh6A+7bPjcq
         dbT20uypmtRYGCv3xj+U/Woj6jopThrVtTH+cCiwXw4tPZGCAgHSRm9558ovv4jIO0p7
         R1L3QTkhWAFMS763EImaPt6bob7p54WMDqUq6DuHKdi0Oe8Z/qTnW5s37R+ZlUygSDtC
         dHgX8/eNODpZazRGdWoVV4qi6WPkNrBvh5pv5nbbWZ6Gv7vD1V5VRXjB+qbjtT+YbvPE
         A5caqiLYCHwnq/kKVkRMUSxPaL60taWWylHrsaKlE6GQTcJrixTVCp89jwXS5BxxCO8g
         adtQ==
X-Gm-Message-State: APuU4Z8HKBS8VraOgJfg8S9RcGiJ/Hk9eb1u04nnLUhDHzEraKJ+5w7v
	s7jQ9phwcqDfmUGKOeMW9tIaaiNcOnhsz1TBmAdaIGpkS3gdAMaDUG3GV9n9R87zHx8mwdi2+ow
	R3Y+s8GXrZ4iUdSdPx+/cI6IcFfWS/laiW6o=
X-Gm-Gg: AYBFou3lM9W5X2VOOo6F8xhHsXpDNmxMYpvENR5ZaLMxjfhTfw6BNmhyeExRxqzuiCs
	9DzSSLv/9cQHvMW3bnMMWfspt76jgdn1G4xRG9JdxJxk1vMhihc3swn2C0VU0EnjUmRD9/l2qQf
	fLwTPMUK/wE1Z7OoO2HpcWLn8QjNRjii6WZ4apKeVMprfHt7jkvtIvwiZsLQZIuL4br9p7IuW/Q
	g+sCY/VU0JkCy41uFc/d/rALx6eVB0oBSI4qz0ChCl8ZazEYCogzCve1Ys0jh/2ASxsfDGrT9tT
	YV0vkYLLQUVaxa2mioSR5VRapJ8A/tUG17gg2TBtC0aejfXbrByGQa74XBMswk2NxOT4en/ieuV
	af82O9A801CrmzzN3UphlgsiHJ9tCtvHXMg==
X-Received: by 2002:a53:d44b:0:b0:677:c21a:ea51 with SMTP id
 956f58d0204a3-67c143def8amr1192896d50.27.1793986054598; Fri, 06 Nov 2026
 09:27:34 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Gm-Features: AclHuK_CDvYFpv9JuF-zdE3RIr1SD3MUDxqInWsH7huHG2-IZ7KScm633lI5fn0
X-Cc: christian.couder@gmail.com, 
	Siddharth Asthana <siddharthasthana31@gmail.com>