summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-12-12 19:53:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-12 20:35:22 (GMT)
commite724197f236aa1a4fa87a8e7dd1377dbd0199307 (patch)
treeddda111031aff6b51fbf9a83ef65fc3ee356f8b1 /builtin/fetch.c
parent7da9aba417868afa11ef0baa4078dc2dadde5333 (diff)
downloadgit-e724197f236aa1a4fa87a8e7dd1377dbd0199307.zip
git-e724197f236aa1a4fa87a8e7dd1377dbd0199307.tar.gz
git-e724197f236aa1a4fa87a8e7dd1377dbd0199307.tar.bz2
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/fetch.c')
-rw-r--r--builtin/fetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e705237..e656746 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,