Merge branch 'jt/submodule-fetch-errmsg'
[gitweb.git] / repository.c
index 5cad2dcc86a530ab088cda98a5c64bbe78102038..682c239fe3eda6c16b7be45fc5c920a325d61817 100644 (file)
@@ -157,7 +157,7 @@ int repo_init(struct repository *repo,
              const char *gitdir,
              const char *worktree)
 {
-       struct repository_format format;
+       struct repository_format format = REPOSITORY_FORMAT_INIT;
        memset(repo, 0, sizeof(*repo));
 
        repo->objects = raw_object_store_new();
@@ -174,6 +174,7 @@ int repo_init(struct repository *repo,
        if (worktree)
                repo_set_worktree(repo, worktree);
 
+       clear_repository_format(&format);
        return 0;
 
 error: