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-helper.c | |
parent | 8020803f5057601c1c29ffcdbd309905bd26eef7 (diff) | |
parent | c915f11eb4922e154e29cf62d3b549d65c06a170 (diff) | |
download | git-e84d5e9fa178a027b1c8b9f6e22c9173dcda03b3.tar.gz |
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-helper.c')
-rw-r--r-- | transport-helper.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c index a6bff8b308..b934183236 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -321,6 +321,21 @@ static void standard_options(struct transport *t) if (n >= sizeof(buf)) die("impossibly large verbosity value"); set_helper_option(t, "verbosity", buf); + + switch (t->family) { + case TRANSPORT_FAMILY_ALL: + /* + * this is already the default, + * do not break old remote helpers by setting "all" here + */ + break; + case TRANSPORT_FAMILY_IPV4: + set_helper_option(t, "family", "ipv4"); + break; + case TRANSPORT_FAMILY_IPV6: + set_helper_option(t, "family", "ipv6"); + break; + } } static int release_helper(struct transport *transport) |