diff options
author | Brandon Williams <bmwill@google.com> | 2017-12-12 11:53:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-12 12:35:22 -0800 |
commit | e724197f236aa1a4fa87a8e7dd1377dbd0199307 (patch) | |
tree | ddda111031aff6b51fbf9a83ef65fc3ee356f8b1 /builtin | |
parent | submodule: used correct index in is_staging_gitmodules_ok (diff) | |
download | tgif-e724197f236aa1a4fa87a8e7dd1377dbd0199307.tar.xz |
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 <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index e705237fa9..e656746ab9 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -3,6 +3,7 @@ */ #include "cache.h" #include "config.h" +#include "repository.h" #include "refs.h" #include "commit.h" #include "builtin.h" @@ -1397,7 +1398,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) struct argv_array options = ARGV_ARRAY_INIT; add_options_to_argv(&options); - result = fetch_populated_submodules(&options, + result = fetch_populated_submodules(the_repository, + &options, submodule_prefix, recurse_submodules, recurse_submodules_default, |