]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ar/fetch-ipversion-in-all'
authorJunio C Hamano <gitster@pobox.com>
Tue, 22 Sep 2020 19:36:34 +0000 (12:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Sep 2020 19:36:34 +0000 (12:36 -0700)
"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

builtin/fetch.c

index 76a4d14f57595054819e5a588603cb2d78b49b7b..1b00c2bee90bf1664d49b8bb7d1bbae25b11c3d2 100644 (file)
@@ -1552,7 +1552,10 @@ static void add_options_to_argv(struct strvec *argv)
                strvec_push(argv, "-v");
        else if (verbosity < 0)
                strvec_push(argv, "-q");
-
+       if (family == TRANSPORT_FAMILY_IPV4)
+               strvec_push(argv, "--ipv4");
+       else if (family == TRANSPORT_FAMILY_IPV6)
+               strvec_push(argv, "--ipv6");
 }
 
 /* Fetch multiple remotes in parallel */