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 --- t/helper/test-submodule-config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/helper/test-submodule-config.c b/t/helper/test-submodule-config.c index 9971c5e9dd..e044871cee 100644 --- a/t/helper/test-submodule-config.c +++ b/t/helper/test-submodule-config.c @@ -48,9 +48,11 @@ int cmd_main(int argc, const char **argv) die_usage(argc, argv, "Commit not found."); if (lookup_name) { - submodule = submodule_from_name(&commit_oid, path_or_name); + submodule = submodule_from_name(the_repository, + &commit_oid, path_or_name); } else - submodule = submodule_from_path(&commit_oid, path_or_name); + submodule = submodule_from_path(the_repository, + &commit_oid, path_or_name); if (!submodule) die_usage(argc, argv, "Submodule not found."); -- cgit v1.2.3