diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-02 22:49:18 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-03 00:26:46 +0300 |
commit | f20e7c1ea2459d9b8c12f8ed1f1546665841b643 (patch) | |
tree | eb2474b554018a9d9470428b1493b7b58f7d5cc7 /submodule.c | |
parent | b22e51cb26bc93bd1548950e61970a9973e04b70 (diff) |
submodule: remove submodule.fetchjobs from submodule-config parsing
The '.gitmodules' file should only contain information pertinent to
configuring individual submodules (name to path mapping, URL where to
obtain the submodule, etc.) while other configuration like the number of
jobs to use when fetching submodules should be a part of the
repository's config.
Remove the 'submodule.fetchjobs' configuration option from the general
submodule-config parsing and instead rely on using the
'config_from_gitmodules()' in order to maintain backwards compatibility
with this config being placed in the '.gitmodules' file.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/submodule.c b/submodule.c index 64ad5c12d8..aa4fb1eaa2 100644 --- a/submodule.c +++ b/submodule.c @@ -22,7 +22,6 @@ static int config_fetch_recurse_submodules = RECURSE_SUBMODULES_ON_DEMAND; static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF; -static int parallel_jobs = 1; static struct string_list changed_submodule_paths = STRING_LIST_INIT_DUP; static int initialized_fetch_ref_tips; static struct oid_array ref_tips_before_fetch; @@ -159,12 +158,7 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, /* For loading from the .gitmodules file. */ static int git_modules_config(const char *var, const char *value, void *cb) { - if (!strcmp(var, "submodule.fetchjobs")) { - parallel_jobs = git_config_int(var, value); - if (parallel_jobs < 0) - die(_("negative values not allowed for submodule.fetchJobs")); - return 0; - } else if (starts_with(var, "submodule.")) + if (starts_with(var, "submodule.")) return parse_submodule_config_option(var, value); else if (!strcmp(var, "fetch.recursesubmodules")) { config_fetch_recurse_submodules = parse_fetch_recurse_submodules_arg(var, value); @@ -1303,9 +1297,6 @@ int fetch_populated_submodules(const struct argv_array *options, argv_array_push(&spf.args, "--recurse-submodules-default"); /* default value, "--submodule-prefix" and its value are added later */ - if (max_parallel_jobs < 0) - max_parallel_jobs = parallel_jobs; - calculate_changed_submodule_paths(); run_processes_parallel(max_parallel_jobs, get_next_submodule, @@ -1825,11 +1816,6 @@ int merge_submodule(struct object_id *result, const char *path, return 0; } -int parallel_submodules(void) -{ - return parallel_jobs; -} - /* * Embeds a single submodules git directory into the superprojects git dir, * non recursively. |