Subject: Re: [PATCH v3 06/12] backfill: die on incompatible filter options

From: Taylor Blau <[email-masked]>
Date: Mon, 11 May 2026 21:26:49 -0400

On Mon, May 11, 2026 at 06:13:03PM +0000, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <[email-masked]>
>
> The 'git backfill' command uses the path-walk API in a critical way: it
> uses the objects output from the command to find the batches of missing
> objects that should be requested from the server. Unlike 'git
> pack-objects', we cannot fall back to another mechanism.
>
> The previous change added the path_walk_filter_compatible() method that
> we can reuse here. Use it during argument validation in cmd_backfill().

Makes sense.

> @@ -96,9 +96,8 @@ static void reject_unsupported_rev_list_options(struct rev_info *revs)
>  	if (revs->explicit_diff_merges)
>  		die(_("'%s' cannot be used with 'git backfill'"),
>  		    "--diff-merges");
> -	if (revs->filter.choice)
> -		die(_("'%s' cannot be used with 'git backfill'"),
> -		    "--filter");
> +	if (!path_walk_filter_compatible(&revs->filter))
> +		die(_("cannot backfill with these filter options"));

I was going to suggest that we indicate the type of object filter which
was incompatible, but that gets a little tricky if the incompatible
filter is a child of a LOFC_COMBINE filter.

Resolving that does not seem worth our while, so I think that what you
wrote here is more than sufficient.

Thanks,
Taylor