summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/init-db.c1
-rw-r--r--setup.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 6223b7d46a..da531f6b76 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -322,6 +322,7 @@ int set_git_dir_init(const char *git_dir, const char *real_git_dir,
set_git_dir(real_path(git_dir));
git_link = NULL;
}
+ startup_info->have_repository = 1;
return 0;
}
diff --git a/setup.c b/setup.c
index fa7a306287..3439ec6d81 100644
--- a/setup.c
+++ b/setup.c
@@ -986,7 +986,9 @@ int check_repository_format_version(const char *var, const char *value, void *cb
int check_repository_format(void)
{
- return check_repository_format_gently(get_git_dir(), NULL);
+ check_repository_format_gently(get_git_dir(), NULL);
+ startup_info->have_repository = 1;
+ return 0;
}
/*