From: Taylor Blau Date: Fri, 10 Jul 2026 22:14:28 GMT Subject: Re: [PATCH 2/2] commit-graph: propagate topo_levels slab to all chain layers Message-ID: In-Reply-To: On Tue, Jul 07, 2026 at 04:57:13PM +0200, Kristofer Karlsson wrote: > (b) Move topo_levels to struct object_database. Since > fill_commit_graph_info() can already reach the odb via > g->odb_source->odb, no signature changes are needed. > The write side becomes a single assignment: > > ctx.r->objects->topo_levels = &topo_levels; > > and cleanup becomes: > > ctx.r->objects->topo_levels = NULL; > > No chain walk needed and the diff is fairly small. > I am not sure about the semantics of it though -- should the odb > have a reference to topo_levels? This seems to be the most promising approach, though I'd be curious what Patrick's thoughts are. The commit-slab API is really a property of the object database, but we treat these as a global as I do not recall them yet being touched by the ODB refactoring effort. > [...] > > I have a prototype of (b) that compiles and passes the test suite. > > For now though, I think the minimal bugfix is the right thing to do. Agreed. Thanks, Taylor