@matheusbsbs / matheus-bagliano / commits / 4e735c1326
Fork 0

fetch: pass --ipv4 and --ipv6 options to sub-fetches

The options indicate user intent for the whole fetch operation, and ignoring them in sub-fetches (i.e. "--all" and recursive fetching of submodules) is quite unexpected when, for instance, it is intended to limit all of the communication to a specific transport protocol for some reason. Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed Sep 15, 2020 at 13:54 UTC 4e735c13267e65f8c37fc3e7dfaacb36e5d51ab8
1 file changed +4
builtin/fetch.c
+4
@@ -1531,6 +1531,10 @@ static void add_options_to_argv(struct argv_array *argv)
1531 argv_array_push(argv, "-v");
1532 else if (verbosity < 0)
1533 argv_array_push(argv, "-q");
1534 + if (family == TRANSPORT_FAMILY_IPV4)
1535 + argv_array_push(argv, "--ipv4");
1536 + else if (family == TRANSPORT_FAMILY_IPV6)
1537 + argv_array_push(argv, "--ipv6");
1538
1539 }
1540