diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-24 13:25:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-24 13:25:54 -0800 |
commit | e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3 (patch) | |
tree | b3d16c3076cb8bce048c54e331e86f56e0c0533b /transport.c | |
parent | 8020803f5057601c1c29ffcdbd309905bd26eef7 (diff) | |
parent | c915f11eb4922e154e29cf62d3b549d65c06a170 (diff) | |
download | git-e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3.tar.gz git-e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3.tar.xz |
Merge branch 'ew/force-ipv4'
"git fetch" and friends that make network connections can now be
told to only use ipv4 (or ipv6).
* ew/force-ipv4:
connect & http: support -4 and -6 switches for remote operations
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/transport.c b/transport.c index c92f8ae70..e20bb771f 100644 --- a/transport.c +++ b/transport.c @@ -163,6 +163,12 @@ static int connect_setup(struct transport *transport, int for_push) if (data->conn) return 0; + switch (transport->family) { + case TRANSPORT_FAMILY_ALL: break; + case TRANSPORT_FAMILY_IPV4: flags |= CONNECT_IPV4; break; + case TRANSPORT_FAMILY_IPV6: flags |= CONNECT_IPV6; break; + } + data->conn = git_connect(data->fd, transport->url, for_push ? data->options.receivepack : data->options.uploadpack, |