Re: [PATCH 4/5] backfill: work with prefix pathspecs
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Mar 23, 2026, 00:47 UTC
- Message-ID
- <90210abe-8e98-469a-aa15-fe379d2eb3e6@gmail.com>
- In-Reply-To
- <abvMwBr_03_Z0nMX@pks.im>
On 3/19/26 6:15 AM, Patrick Steinhardt wrote:
> Ah, one more thing: we could expose `dir_prefix()` from "path.c" and > reuse it here.
Good idea. This becomes
/*
* Continue if either is a directory prefix
* of the other.
*/
if (dir_prefix(path.buf, item->match) ||
dir_prefix(item->match, path.buf)) {
found = true;
break;
}With the idea that we need to walk the parents of each prefix in addition to walking all of their children.
Thanks, -Stolee