Subject: Re: [PATCH v3] backfill: handle unexpected arguments

From: Derrick Stolee <[email-masked]>
Date: Sun, 22 Mar 2026 21:42:21 -0400

On 3/22/26 9:01 PM, Junio C Hamano wrote:
> Derrick Stolee <[email-masked]> writes:
> 
>>> +	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]?
> 
> Ahh, that one completely slipped my mind.
> 
> Thanks for a doze of sanity.  This patch becomes completely
> irrelevant if we are taking command line arguments.
> 
> It will become the responsibility of the other topic to detect and
> complain about excess command line parameters (unless the feature it
> adds absorbs all of them, which may be the case).

At the end of my series, the error output for an unknown argument now
looks like this:

   fatal: ambiguous argument 'unexpected-arg': unknown revision or
   path not in the working tree.

I'm not sure it's worth updating this, but I can incorporate a test
that shows that this is handled.

Thanks,
-Stolee