aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-09-08 08:29:30 +0000
committerJunio C Hamano <gitster@pobox.com>2021-09-08 12:17:14 -0700
commit957ba814bf93b698742ffa3cf37e4f665ed95b45 (patch)
tree614ed0817c52b60eb33a1454a5062ada3b6e462a /commit-graph.c
parent225bc32a989d7a22fa6addafd4ce7dcd04675dbf (diff)
downloadgit-957ba814bf93b698742ffa3cf37e4f665ed95b45.tar.gz
commit-graph: when closing the graph, also release the slab
The slab has information about the commit graph. That means that it is meaningless (and even misleading) when the commit graph was closed. This seems not to matter currently, but we're about to fix a Windows-specific bug where `git pull` does not close the object store before fetching (risking that an implicit auto-gc fails to remove the now-obsolete pack file(s)), and once we have that bug fix in place, it does matter: after that bug fix, we will open the object store, do some stuff with it, then close it, fetch, and then open it again, and do more stuff. If we close the commit graph without releasing the corresponding slab, we're hit by a symptom like this in t5520.19: BUG: commit-reach.c:85: bad generation skip 9223372036854775807 > 3 at 5cd378271655d43a3b4477520014f02213ad1546 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 3860a0d847..0998445515 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -713,6 +713,7 @@ static void close_commit_graph_one(struct commit_graph *g)
if (!g)
return;
+ clear_commit_graph_data_slab(&commit_graph_data_slab);
close_commit_graph_one(g->base_graph);
free_commit_graph(g);
}