From 3b8fb393bc32f8d96c2eb4c89349c864e5c56039 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Wed, 28 Mar 2018 15:35:29 -0700 Subject: 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 Signed-off-by: Stefan Beller Reviewed-by: Jonathan Tan Signed-off-by: Junio C Hamano --- submodule-config.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'submodule-config.h') diff --git a/submodule-config.h b/submodule-config.h index 6b71a8cd30..43dfe7dec0 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); -- cgit v1.2.1