Fix initialization of a bare repository
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index c46691e9767bedf4af9cafcd4f48d858d220e8a5..b6e292e29fa63c7652db10853659441de2e89624 100644 (file)
--- a/git.c
+++ b/git.c
@@ -93,6 +93,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "--bare")) {
                        static char git_dir[PATH_MAX+1];
+                       is_bare_repository_cfg = 1;
                        setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 1);
                        if (envchanged)
                                *envchanged = 1;