summaryrefslogtreecommitdiff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-08-02 12:49:18 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-02 14:26:46 -0700
commitf20e7c1ea2459d9b8c12f8ed1f1546665841b643 (patch)
treeeb2474b554018a9d9470428b1493b7b58f7d5cc7 /submodule-config.c
parentb22e51cb26bc93bd1548950e61970a9973e04b70 (diff)
downloadgit-f20e7c1ea2459d9b8c12f8ed1f1546665841b643.tar.gz
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-config.c')
-rw-r--r--submodule-config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/submodule-config.c b/submodule-config.c
index 5fe2d07877..70400f553a 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -248,6 +248,14 @@ static int parse_fetch_recurse(const char *opt, const char *arg,
}
}
+int parse_submodule_fetchjobs(const char *var, const char *value)
+{
+ int fetchjobs = git_config_int(var, value);
+ if (fetchjobs < 0)
+ die(_("negative values not allowed for submodule.fetchjobs"));
+ return fetchjobs;
+}
+
int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg)
{
return parse_fetch_recurse(opt, arg, 1);