diff options
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commit-graph.c b/commit-graph.c index d3e2ee4bf2..33b3a2086c 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2062,6 +2062,11 @@ int write_commit_graph(struct object_directory *odb, int res = 0; int replace = 0; + prepare_repo_settings(the_repository); + if (!the_repository->settings.core_commit_graph) { + warning(_("attempting to write a commit-graph, but 'core.commitGraph' is disabled")); + return 0; + } if (!commit_graph_compatible(the_repository)) return 0; |