Re: [PATCH v2 1/4] odb: decouple source path comparisons from `the_repository`
Jeff King <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 17, 2026 at 09:16:53AM +0200, Patrick Steinhardt wrote: > > So if we want to go down this path I'm inclined to just unconditionally > > use case sensitive matching and not introduce any secondary machinery. > > Thinking about this a bit more: I'd suggest that we leave this out of > this patch and instead document this as a NEEDSWORK area for now. I > _think_ that this proposed refactoring should be generally fine, and I > quite like the simplification that results from it. But the risk for > regression is quite a bit higher compared to the origanal patch that > I've proposed. OK. The inline lookup of core.ignoreCase feels quite gross to me, but it's _probably_ OK. There are all kinds of weird timing issues lurking with config lookup, though. In particular you cache the result in o->source_paths_icase. But would we ever load odb source paths before the repo is fully loaded into memory (or in the case of clone, even fully formed on disk)? In that case we'd cache the wrong value forever. I think we have repo_ignore_case() now, since e6a79c9eb8 (config: use repo_ignore_case() to access core.ignorecase, 2026-06-19). That's in 'master', so it might be worth building on that instead. And then if there's any cache invalidation to do, it would eventually happen there. -Peff