summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:54 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:54 -0800
commite84d5e9fa178a027b1c8b9f6e22c9173dcda03b3 (patch)
treeb3d16c3076cb8bce048c54e331e86f56e0c0533b /remote-curl.c
parent8020803f5057601c1c29ffcdbd309905bd26eef7 (diff)
parentc915f11eb4922e154e29cf62d3b549d65c06a170 (diff)
downloadgit-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 'remote-curl.c')
-rw-r--r--remote-curl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/remote-curl.c b/remote-curl.c
index c7048575fb..b33a1e4235 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -119,6 +119,19 @@ static int set_option(const char *name, const char *value)
else
return -1;
return 0;
+
+#if LIBCURL_VERSION_NUM >= 0x070a08
+ } else if (!strcmp(name, "family")) {
+ if (!strcmp(value, "ipv4"))
+ git_curl_ipresolve = CURL_IPRESOLVE_V4;
+ else if (!strcmp(value, "ipv6"))
+ git_curl_ipresolve = CURL_IPRESOLVE_V6;
+ else if (!strcmp(value, "all"))
+ git_curl_ipresolve = CURL_IPRESOLVE_WHATEVER;
+ else
+ return -1;
+ return 0;
+#endif /* LIBCURL_VERSION_NUM >= 0x070a08 */
} else {
return 1 /* unsupported */;
}