Skip to content

Commit 5314a5a

Browse files
committed
commit-graph: not compatible with uninitialized repo
Signed-off-by: Derrick Stolee <[email protected]>
1 parent 94dd91a commit 5314a5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

commit-graph.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ static struct commit_graph *alloc_commit_graph(void)
6060

6161
static int commit_graph_compatible(struct repository *r)
6262
{
63+
if (!r->gitdir)
64+
return 0;
65+
6366
prepare_commit_graft(r);
6467
if (r->parsed_objects && r->parsed_objects->grafts_nr)
6568
return 0;

0 commit comments

Comments
 (0)