From: Derrick Stolee <stolee@gmail.com>
To: Siddharth Shrimali <r.siddharth.shrimali@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, ps@pks.im
Subject: Re: [PATCH v3] backfill: handle unexpected arguments
Date: Sun, 22 Mar 2026 19:01:33 -0400 [thread overview]
Message-ID: <d8e6f854-e838-439f-bc5a-27cbb4091e4f@gmail.com> (raw)
In-Reply-To: <20260322053207.60992-1-r.siddharth.shrimali@gmail.com>
On 3/22/26 1:32 AM, Siddharth Shrimali wrote:
> git backfill takes no non-option arguments. However, if extra
> arguments are passed with git backfill, parse_options() leaves
> them in argc and the command ignores them silently, giving the
> user no indication that something is wrong.
> @@ -135,6 +135,11 @@ int cmd_backfill(int argc, const char **argv, const char *prefix, struct reposit
>
> argc = parse_options(argc, argv, prefix, options, builtin_backfill_usage,
> 0);
> +
> + if (argc) {
> + error(_("unknown argument '%s'"), argv[0]);
> + usage(builtin_backfill_usage[0]);
> + }
Before we get too far into this: How does this interact with
the ongoing change to introduce revision arguments to 'git
backfill' [1]? I suppose that the important bit would be that
we still parse arguments using the revision walk machinery at
some point, but it would be difficult to guarantee that when
working on a patch disconnected from that series.
[1] https://lore.kernel.org/git/pull.2070.git.1773707361.gitgitgadget@gmail.com/
Thanks,
-Stolee
next prev parent reply other threads:[~2026-03-22 23:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 3:16 [PATCH] backfill: handle unexpected arguments Siddharth Shrimali
2026-03-21 4:42 ` Junio C Hamano
2026-03-21 5:03 ` Junio C Hamano
2026-03-21 17:47 ` [PATCH v2] " Siddharth Shrimali
2026-03-22 1:13 ` Junio C Hamano
2026-03-22 5:32 ` [PATCH v3] " Siddharth Shrimali
2026-03-22 16:38 ` Phillip Wood
2026-03-22 18:06 ` Junio C Hamano
2026-03-22 23:01 ` Derrick Stolee [this message]
2026-03-23 1:01 ` Junio C Hamano
2026-03-23 1:42 ` Derrick Stolee
2026-03-23 6:17 ` Siddharth Shrimali
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=d8e6f854-e838-439f-bc5a-27cbb4091e4f@gmail.com \
--to=stolee@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=r.siddharth.shrimali@gmail.com \
/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