repository: repo_submodule_init to take a submodule struct
[gitweb.git] / builtin / submodule--helper.c
index d38113a31aeb3838190b7339475c7454e45f3a89..4eceb8f040b616760205c2f928a04606b80fe190 100644 (file)
@@ -2053,7 +2053,7 @@ static int ensure_core_worktree(int argc, const char **argv, const char *prefix)
        if (!sub)
                BUG("We could get the submodule handle before?");
 
-       if (repo_submodule_init(&subrepo, the_repository, path))
+       if (repo_submodule_init(&subrepo, the_repository, sub))
                die(_("could not get a repository handle for submodule '%s'"), path);
 
        if (!repo_config_get_string(&subrepo, "core.worktree", &cw)) {