summaryrefslogtreecommitdiffstats
path: root/submodule-config.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-28 15:35:29 -0700
committerJunio C Hamano <gitster@pobox.com>2018-03-29 09:44:50 -0700
commit3b8fb393bc32f8d96c2eb4c89349c864e5c56039 (patch)
tree98f5dff330383e8f12503faf6e0739c251050b25 /submodule-config.h
parentf793b895fd752e37301702eaff948a40e7c0a4b8 (diff)
downloadgit-3b8fb393bc32f8d96c2eb4c89349c864e5c56039.tar.gz
git-3b8fb393bc32f8d96c2eb4c89349c864e5c56039.tar.xz
submodule-config: add repository argument to submodule_from_{name, path}
This enables submodule_from_{name, path} to handle arbitrary repositories. All callers just pass in the_repository, a later patch will pass in other repos. While at it remove the extern key word from the declarations. Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.h')
-rw-r--r--submodule-config.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/submodule-config.h b/submodule-config.h
index 6b71a8cd3..43dfe7dec 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -39,10 +39,12 @@ extern int parse_update_recurse_submodules_arg(const char *opt, const char *arg)
extern int parse_push_recurse_submodules_arg(const char *opt, const char *arg);
extern void repo_read_gitmodules(struct repository *repo);
extern void gitmodules_config_oid(const struct object_id *commit_oid);
-extern const struct submodule *submodule_from_name(
- const struct object_id *commit_or_tree, const char *name);
-extern const struct submodule *submodule_from_path(
- const struct object_id *commit_or_tree, const char *path);
+const struct submodule *submodule_from_name(struct repository *r,
+ const struct object_id *commit_or_tree,
+ const char *name);
+const struct submodule *submodule_from_path(struct repository *r,
+ const struct object_id *commit_or_tree,
+ const char *path);
extern const struct submodule *submodule_from_cache(struct repository *repo,
const struct object_id *treeish_name,
const char *key);