diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-16 19:11:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-16 19:11:58 +0100 |
commit | 4cc0f8e8fa3694fdef632784592fc8af63022618 (patch) | |
tree | 7754f7dc32d60686444ddd5081dbc0d3a8742b9b /commit-graph.c | |
parent | Merge branch 'jk/index-pack-lsan-false-positive-fix' (diff) | |
parent | commit-graph: retain commit slab when closing NULL commit_graph (diff) | |
download | git-4cc0f8e8fa3694fdef632784592fc8af63022618.tar.xz git-4cc0f8e8fa3694fdef632784592fc8af63022618.zip |
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.c | 3 |
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; |