Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-08-20 21:24:32 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-21 20:22:51 +0300
commit5cef295f283e84351a104c66f949a53a56297aa7 (patch)
treec2cc15d52db631539e34ff80d259e83b378c5eb1 /commit-graph.c
parent20fd6d57996e33c30b6bb030329523d0116f15ec (diff)
commit-graph: not compatible with uninitialized repo
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c3
1 files changed, 3 insertions, 0 deletions
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))