From: Patrick Steinhardt Date: Thu, 19 Mar 2026 09:55:12 GMT Subject: Re: [PATCH 4/5] backfill: work with prefix pathspecs Message-ID: In-Reply-To: <977f62faa550ecc4ef7774b4ecf53a9a520fc62a.1773707361.git.gitgitgadget@gmail.com> On Tue, Mar 17, 2026 at 12:29:20AM +0000, Derrick Stolee via GitGitGadget wrote: > diff --git a/path-walk.c b/path-walk.c > index 364e4cfa19..e1ad4b0208 100644 > --- a/path-walk.c > +++ b/path-walk.c > @@ -481,6 +524,18 @@ int walk_objects_by_path(struct path_walk_info *info) > if (info->tags) > info->revs->tag_objects = 1; > > + if (ctx.revs->prune_data.nr) { > + /* > + * Only exact prefix pathspecs are currently supported. > + * Clear any wildcard or magic pathspecs to avoid > + * incorrect prefix matching. > + */ > + struct pathspec *pd = &ctx.revs->prune_data; > + > + if (pd->has_wildcard || pd->magic) > + pd->nr = 0; > + } Huh, curious. Won't this cause a leak? I guess we should rather use `clear_pathspec()` here. Also shows that this path is missing test coverage. Patrick