From e724197f236aa1a4fa87a8e7dd1377dbd0199307 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 12 Dec 2017 11:53:52 -0800 Subject: submodule: convert get_next_submodule to not rely on the_index Instead of implicitly relying on the global 'the_index', convert 'get_next_submodule()' to use the index of the repository stored in the callback data 'struct submodule_parallel_fetch'. Since this removes the last user of the index compatibility macros, define 'NO_THE_INDEX_COMPATIBILITY_MACROS' to prevent future users of these macros in submodule.c. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- submodule.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'submodule.h') diff --git a/submodule.h b/submodule.h index e2a5de3d8e..b9b7ef0030 100644 --- a/submodule.h +++ b/submodule.h @@ -76,10 +76,12 @@ extern int should_update_submodules(void); */ extern const struct submodule *submodule_from_ce(const struct cache_entry *ce); extern void check_for_new_submodule_commits(struct object_id *oid); -extern int fetch_populated_submodules(const struct argv_array *options, - const char *prefix, int command_line_option, - int default_option, - int quiet, int max_parallel_jobs); +extern int fetch_populated_submodules(struct repository *r, + const struct argv_array *options, + const char *prefix, + int command_line_option, + int default_option, + int quiet, int max_parallel_jobs); extern unsigned is_submodule_modified(const char *path, int ignore_untracked); extern int submodule_uses_gitfile(const char *path); -- cgit v1.2.3