Skip to content

Commit 4e735c1

Browse files
ar-cetitecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47ae905 commit 4e735c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builtin/fetch.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,10 @@ static void add_options_to_argv(struct argv_array *argv)
15311531
argv_array_push(argv, "-v");
15321532
else if (verbosity < 0)
15331533
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");
15341538

15351539
}
15361540

0 commit comments

Comments
 (0)