Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-16 21:11:58 +0300
committerJunio C Hamano <gitster@pobox.com>2024-01-16 21:11:58 +0300
commit4cc0f8e8fa3694fdef632784592fc8af63022618 (patch)
tree7754f7dc32d60686444ddd5081dbc0d3a8742b9b /commit-graph.c
parentb27f67aa932e61906ad92bd09d3051d9c54eb148 (diff)
parentd70f554cdf38b0b05cfaa8e8eb9f80d54a5ae11c (diff)
Merge branch 'jk/commit-graph-slab-clear-fix'
Clearing in-core repository (happens during e.g., "git fetch --recurse-submodules" with commit graph enabled) made in-core commit object in an inconsistent state by discarding the necessary data from commit-graph too early, which has been corrected. * jk/commit-graph-slab-clear-fix: commit-graph: retain commit slab when closing NULL commit_graph
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c
index bba316913c..f86c5e9f94 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -806,6 +806,9 @@ struct bloom_filter_settings *get_bloom_filter_settings(struct repository *r)
void close_commit_graph(struct raw_object_store *o)
{
+ if (!o->commit_graph)
+ return;
+
clear_commit_graph_data_slab(&commit_graph_data_slab);
free_commit_graph(o->commit_graph);
o->commit_graph = NULL;