Re: [PATCH v3 06/12] backfill: die on incompatible filter options
- From
Taylor Blau <me@ttaylorr.com>
- Date
- May 12, 2026, 01:26 UTC
- Message-ID
- <agKB2bNgtQcztA42@nand.local>
- In-Reply-To
- <da191e29e68bd46a56adea35ba1e7a41ff2a15c5.1778523189.git.gitgitgadget@gmail.com>
On Mon, May 11, 2026 at 06:13:03PM +0000, Derrick Stolee via GitGitGadget wrote:
Show 9 quoted lines
> From: Derrick Stolee <stolee@gmail.com> > > 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.
Show 9 quoted lines
> @@ -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