typedef void (*each_submodule_fn)(const struct cache_entry *list_item,
void *cb_data);
-static int get_default_remote_submodule(const char *module_path, char **default_remote)
-{
- struct repository subrepo;
-
- if (repo_submodule_init(&subrepo, the_repository, module_path,
- null_oid(the_hash_algo)) < 0)
- return die_message(_("could not get a repository handle for submodule '%s'"),
- module_path);
-
- *default_remote = xstrdup(repo_default_remote(&subrepo));
-
- repo_clear(&subrepo);
-
- return 0;
-}
-
static char *get_default_remote(void)
{
return xstrdup(repo_default_remote(the_repository));
return resolved_url;
}
+static int get_default_remote_submodule(const char *module_path, char **default_remote)
+{
+ struct repository subrepo;
+
+ if (repo_submodule_init(&subrepo, the_repository, module_path,
+ null_oid(the_hash_algo)) < 0)
+ return die_message(_("could not get a repository handle for submodule '%s'"),
+ module_path);
+
+ *default_remote = xstrdup(repo_default_remote(&subrepo));
+
+ repo_clear(&subrepo);
+
+ return 0;
+}
+
/* the result should be freed by the caller. */
static char *get_submodule_displaypath(const char *path, const char *prefix,
const char *super_prefix)