From: Junio C Hamano Date: Tue, 22 Sep 2020 19:36:34 +0000 (-0700) Subject: Merge branch 'ar/fetch-ipversion-in-all' X-Git-Tag: v2.29.0-rc0~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6854689e65700b361eb5d7ff3d4af01bd3e650fe;p=thirdparty%2Fgit.git Merge branch 'ar/fetch-ipversion-in-all' "git fetch --all --ipv4/--ipv6" forgot to pass the protocol options to instances of the "git fetch" that talk to individual remotes, which has been corrected. * ar/fetch-ipversion-in-all: fetch: pass --ipv4 and --ipv6 options to sub-fetches --- 6854689e65700b361eb5d7ff3d4af01bd3e650fe diff --cc builtin/fetch.c index 76a4d14f57,447d28ac29..1b00c2bee9 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@@ -1524,35 -1503,39 +1524,38 @@@ static int add_remote_or_group(const ch return 1; } -static void add_options_to_argv(struct argv_array *argv) +static void add_options_to_argv(struct strvec *argv) { if (dry_run) - argv_array_push(argv, "--dry-run"); + strvec_push(argv, "--dry-run"); if (prune != -1) - argv_array_push(argv, prune ? "--prune" : "--no-prune"); + strvec_push(argv, prune ? "--prune" : "--no-prune"); if (prune_tags != -1) - argv_array_push(argv, prune_tags ? "--prune-tags" : "--no-prune-tags"); + strvec_push(argv, prune_tags ? "--prune-tags" : "--no-prune-tags"); if (update_head_ok) - argv_array_push(argv, "--update-head-ok"); + strvec_push(argv, "--update-head-ok"); if (force) - argv_array_push(argv, "--force"); + strvec_push(argv, "--force"); if (keep) - argv_array_push(argv, "--keep"); + strvec_push(argv, "--keep"); if (recurse_submodules == RECURSE_SUBMODULES_ON) - argv_array_push(argv, "--recurse-submodules"); + strvec_push(argv, "--recurse-submodules"); else if (recurse_submodules == RECURSE_SUBMODULES_ON_DEMAND) - argv_array_push(argv, "--recurse-submodules=on-demand"); + strvec_push(argv, "--recurse-submodules=on-demand"); if (tags == TAGS_SET) - argv_array_push(argv, "--tags"); + strvec_push(argv, "--tags"); else if (tags == TAGS_UNSET) - argv_array_push(argv, "--no-tags"); + strvec_push(argv, "--no-tags"); if (verbosity >= 2) - argv_array_push(argv, "-v"); + strvec_push(argv, "-v"); if (verbosity >= 1) - argv_array_push(argv, "-v"); + strvec_push(argv, "-v"); else if (verbosity < 0) - argv_array_push(argv, "-q"); + strvec_push(argv, "-q"); - + if (family == TRANSPORT_FAMILY_IPV4) - argv_array_push(argv, "--ipv4"); ++ strvec_push(argv, "--ipv4"); + else if (family == TRANSPORT_FAMILY_IPV6) - argv_array_push(argv, "--ipv6"); - ++ strvec_push(argv, "--ipv6"); } /* Fetch multiple remotes in parallel */