From: Derrick Stolee Date: Mon, 20 Aug 2018 18:24:32 +0000 (+0000) Subject: commit-graph: not compatible with uninitialized repo X-Git-Tag: v2.20.0-rc0~193^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cef295f283e84351a104c66f949a53a56297aa7;p=thirdparty%2Fgit.git commit-graph: not compatible with uninitialized repo Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- diff --git a/commit-graph.c b/commit-graph.c index c4eaedf4e5..cee2caab5c 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -62,6 +62,9 @@ extern int read_replace_refs; static int commit_graph_compatible(struct repository *r) { + if (!r->gitdir) + return 0; + if (read_replace_refs) { prepare_replace_object(r); if (hashmap_get_size(&r->objects->replace_map->map))