#include "submodule-config.h"
/* The main repository */
-static struct repository the_repo;
+static struct repository the_repo = {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, 0, 0
+};
struct repository *the_repository = &the_repo;
static char *git_path_from_env(const char *envvar, const char *git_dir,
struct strbuf worktree = STRBUF_INIT;
int ret = 0;
- sub = submodule_from_cache(superproject, null_sha1, path);
+ sub = submodule_from_cache(superproject, &null_oid, path);
if (!sub) {
ret = -1;
goto out;
{
if (!repo->index)
repo->index = xcalloc(1, sizeof(*repo->index));
- else
- discard_index(repo->index);
return read_index_from(repo->index, repo->index_file);
}