diff options
author | Stefan Beller <sbeller@google.com> | 2015-12-15 16:04:12 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-12-16 12:06:08 -0800 |
commit | 62104ba14af4845c6c1ba1dab05fad4a289d806f (patch) | |
tree | cb6c41e411e48b33bb12f85eb1e6f1497e73d63a /builtin/pull.c | |
parent | fe85ee6e23e642985004d37e63b4c0d0e5f30587 (diff) | |
download | git-62104ba14af4845c6c1ba1dab05fad4a289d806f.tar.gz |
submodules: allow parallel fetching, add tests and documentation
This enables the work of the previous patches.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 5145fc60a0..9e3c73809f 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -95,6 +95,7 @@ static int opt_force; static char *opt_tags; static char *opt_prune; static char *opt_recurse_submodules; +static char *max_children; static int opt_dry_run; static char *opt_keep; static char *opt_depth; @@ -178,6 +179,9 @@ static struct option pull_options[] = { N_("on-demand"), N_("control recursive fetching of submodules"), PARSE_OPT_OPTARG), + OPT_PASSTHRU('j', "jobs", &max_children, N_("n"), + N_("number of submodules pulled in parallel"), + PARSE_OPT_OPTARG), OPT_BOOL(0, "dry-run", &opt_dry_run, N_("dry run")), OPT_PASSTHRU('k', "keep", &opt_keep, NULL, @@ -525,6 +529,8 @@ static int run_fetch(const char *repo, const char **refspecs) argv_array_push(&args, opt_prune); if (opt_recurse_submodules) argv_array_push(&args, opt_recurse_submodules); + if (max_children) + argv_array_push(&args, max_children); if (opt_dry_run) argv_array_push(&args, "--dry-run"); if (opt_keep) |