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>
This commit is contained in:

committed by
Junio C Hamano

parent
f793b895fd
commit
3b8fb393bc
@ -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.");
|
||||
|
||||
|
Reference in New Issue
Block a user