summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorKristofer Karlsson <krka@spotify.com>2026-07-09 15:03:01 +0000
committerJunio C Hamano <gitster@pobox.com>2026-07-09 10:29:23 -0700
commit8ea36f63d8e63350325705afef885ae215e64217 (patch)
treed911b24e2a3867f5e14eafeda096f6057280e17f /commit-graph.c
parent02d62c33be04260445fb201fc65769f421324ed0 (diff)
commit-graph: propagate topo_levels slab to all chain layers
The topo_levels slab is only propagated to the topmost graph layer instead of all layers in the chain. Commits from lower layers appear to have no generation numbers, so the DFS re-walks the entire ancestry. Fix by making topo_levels visible to all layers, not just the first one. Signed-off-by: Kristofer Karlsson <krka@spotify.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 702ba9731b..a0bca248ac 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2610,7 +2610,7 @@ int write_commit_graph(struct odb_source *source,
g = prepare_commit_graph(ctx.r);
for (struct commit_graph *chain = g; chain; chain = chain->base_graph)
- g->topo_levels = &topo_levels;
+ chain->topo_levels = &topo_levels;
if (flags & COMMIT_GRAPH_WRITE_BLOOM_FILTERS)
ctx.changed_paths = 1;