Re: [PATCH v4 04/13] path-walk: always emit directly-requested objects
- From
Taylor Blau <me@ttaylorr.com>
- Date
- May 22, 2026, 16:36 UTC
- Message-ID
- <ahCF+PGcJ5pACQDW@nand.local>
- In-Reply-To
- <53d46614-7d9d-49ab-ace7-71367f6d2f40@gmail.com>
On Thu, May 21, 2026 at 07:00:39PM -0400, Derrick Stolee wrote:
Show 17 quoted lines
> > Could we instead store this explicitly on the type_and_oid_list, e.g. a > > "direct" flag? I'm not sure whether that type has the right scope for > > this information. If not, I wonder if there is another way to store this > > information, since I worry that future callers may not know about this > > convention and end up changing the result of the path-walk depending on > > how they name their paths. > > I don't find this as fragile as you do, because these "direct" paths > _need_ to start with '/' to avoid collisions with other paths that may > exist _and_ this meaning is internal to the data within the API. Callers > can't change this data, though they will see the paths themselves in the > callback function. > > And as I mentioned before, this is a memory-efficient storage of this > indicator bit because it only consumes memory when it is "on" and the > vast majority of cases where it is "off" it doesn't take any extra > storage.
Ah, I didn't realize that we added '/' at the beginning to avoid collisions. This approach makes sense to me!
Thanks, Taylor