diff options
-rw-r--r-- | commit-graph.c | 3 | ||||
-rwxr-xr-x | t/t5510-fetch.sh | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/commit-graph.c b/commit-graph.c index e4d09da090..f26503295a 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -727,6 +727,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; diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 19c36b57f4..bcf524d549 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -802,7 +802,8 @@ test_expect_success 'fetch.writeCommitGraph with submodules' ' cd super-clone && rm -rf .git/objects/info && git -c fetch.writeCommitGraph=true fetch origin && - test_path_is_file .git/objects/info/commit-graphs/commit-graph-chain + test_path_is_file .git/objects/info/commit-graphs/commit-graph-chain && + git -c fetch.writeCommitGraph=true fetch --recurse-submodules origin ) ' |