summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 9abe62bd5a..0820cf5fb8 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -740,13 +740,13 @@ static struct commit_graph *prepare_commit_graph(struct repository *r)
struct odb_source *source;
/*
- * Early return if there is no git dir or if the commit graph is
+ * Early return if there is no object database or if the commit graph is
* disabled.
*
* This must come before the "already attempted?" check below, because
* we want to disable even an already-loaded graph file.
*/
- if (!r->gitdir || r->commit_graph_disabled)
+ if (!r->objects || r->commit_graph_disabled)
return NULL;
if (r->objects->commit_graph_attempted)