Git development
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: Christian Couder <christian.couder@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Patrick Steinhardt <ps@pks.im>, Elijah Newren <newren@gmail.com>,
	Jeff King <peff@peff.net>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Justin Tobler <jltobler@gmail.com>
Subject: Re: [PATCH v3 0/4] Standardize early option scanning
Date: Sat, 31 Oct 2026 03:03:05 +0530	[thread overview]
Message-ID: <1e194ea7-2e28-4142-b678-d8cb8bca8e35@gmail.com> (raw)
In-Reply-To: <20261012074413.337183-1-christian.couder@gmail.com>

On 10/12/26 13:14, Christian Couder wrote:
> 
> Changes since v2
> ================
> 
> Thanks a lot to Junio and Kaartic who reviewed previous versions.
> 
> Rebased on top of a018953688 (Git 2.56, 2026-09-27) to start from a
> stable base.
> 
> There are a number of important changes since v2:
> 
>   - In patch 1/4, parse_options_takes_argument() now considers
>     PARSE_OPT_LASTARG_DEFAULT options as taking a value. This allows us
>     to remove a limitation that was in v2 as these options now consume
>     the next argument when there is one, like in parse_options().
> 
>   - Patch 2/4 is new, see above.
> 
>   - In patch 3/4, we reuse the new lookup_long_opt() function extracted
>     by patch 2/4. This removes a number of limitations (around negated
>     forms, unambiguous abbreviations and aliases) that were in v2, as
>     the early scan now behaves in a similar way as parse_options()
>     regarding long options. A number of tests have been added to ensure
>     that.
> 
>   - In patch 3/4, the scan now stops at short options, unknown options,
>     ambiguous or disallowed abbreviations, options with a low-level
>     callback, and value-taking options given as the last argument,
>     instead of skipping over them, as it could otherwise take an
>     option's value for an option.
> 
>   - In patch 3/4, early_scan_fn() has a new `unset` argument for
>     negated options, and early_scan_options() now returns the index of
>     the first argument not consumed also when the callback stops the
>     scan.
> 
>   - In patch 4/4, the commit message and documentation are updated to
>     account for the better behavior of the early scan. A related
>     NEEDSWORK comment is also removed, and some tests added.
>

The v3 seems to be in a much better state to me. Just left a few minor 
comments.

Thank you for working on this!

-- 
Sivaraam


      parent reply	other threads:[~2026-10-30 21:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 16:10 [PATCH 0/6] Standardize early option scanning to fix argument parsing bugs Christian Couder
2026-09-02 16:10 ` [PATCH 1/6] parse-options: add early_scan_options() Christian Couder
2026-09-02 22:11   ` Junio C Hamano
2026-09-23  8:10     ` Christian Couder
2026-09-23 17:25       ` Junio C Hamano
2026-09-02 16:10 ` [PATCH 2/6] bisect: fix "--" detection when a term name is "--" Christian Couder
2026-09-02 22:30   ` Junio C Hamano
2026-09-23  8:11     ` Christian Couder
2026-09-23 17:27       ` Junio C Hamano
2026-09-02 16:10 ` [PATCH 3/6] rev-parse: fix "--" detection when it is an option value Christian Couder
2026-09-02 16:10 ` [PATCH 4/6] parse-options: add parse_options_takes_argument() Christian Couder
2026-09-02 16:10 ` [PATCH 5/6] parse-options: build early scan options from a struct option array Christian Couder
2026-09-02 16:10 ` [PATCH 6/6] fast-import: use early_scan_options() for --allow-unsafe-features Christian Couder
2026-09-04  3:38   ` Junio C Hamano
2026-09-02 18:52 ` [PATCH 0/6] Standardize early option scanning to fix argument parsing bugs Junio C Hamano
2026-09-23  8:10   ` Christian Couder
2026-09-23  8:09 ` [PATCH v2 0/3] Standardize early option scanning Christian Couder
2026-09-23  8:09   ` [PATCH v2 1/3] parse-options: add parse_options_takes_argument() Christian Couder
2026-09-23  8:09   ` [PATCH v2 2/3] parse-options: add early_scan_options() Christian Couder
2026-09-30  7:13     ` Kaartic Sivaraam
2026-10-12  8:10       ` Christian Couder
2026-09-23  8:09   ` [PATCH v2 3/3] fast-import: use early_scan_options() for --allow-unsafe-features Christian Couder
2026-10-12  7:44   ` [PATCH v3 0/4] Standardize early option scanning Christian Couder
2026-10-12  7:44     ` [PATCH v3 1/4] parse-options: add parse_options_takes_argument() Christian Couder
2026-10-12  7:44     ` [PATCH v3 2/4] parse-options: extract lookup_long_opt() from parse_long_opt() Christian Couder
2026-10-30 21:08       ` Kaartic Sivaraam
2026-10-12  7:44     ` [PATCH v3 3/4] parse-options: add early_scan_options() Christian Couder
2026-10-30 21:27       ` Kaartic Sivaraam
2026-10-12  7:44     ` [PATCH v3 4/4] fast-import: use early_scan_options() for --allow-unsafe-features Christian Couder
2026-10-30 21:33     ` Kaartic Sivaraam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e194ea7-2e28-4142-b678-d8cb8bca8e35@gmail.com \
    --to=kaartic.sivaraam@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox