summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.c b/setup.c
index 0e0fdba2ae..65fe5ecefb 100644
--- a/setup.c
+++ b/setup.c
@@ -1266,10 +1266,12 @@ int git_config_perm(const char *var, const char *value)
return -(i & 0666);
}
-void check_repository_format(void)
+void check_repository_format(struct repository_format *fmt)
{
struct repository_format repo_fmt = REPOSITORY_FORMAT_INIT;
- check_repository_format_gently(get_git_dir(), &repo_fmt, NULL);
+ if (!fmt)
+ fmt = &repo_fmt;
+ check_repository_format_gently(get_git_dir(), fmt, NULL);
startup_info->have_repository = 1;
clear_repository_format(&repo_fmt);
}