From: Jeff King Date: Tue, 1 Dec 2015 23:54:28 +0000 (-0500) Subject: Merge branch 'dt/http-range' X-Git-Tag: v2.7.0-rc0~26 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/23bc35f3dc8b4241a9a6aa97db2a94d3c4c92468?ds=inline;hp=-c Merge branch 'dt/http-range' Portability fix for a topic already in 'master'. * dt/http-range: http: fix some printf format warnings --- 23bc35f3dc8b4241a9a6aa97db2a94d3c4c92468 diff --combined http.c index 553d85674a,2532976b8e..7d4cb2d448 --- a/http.c +++ b/http.c @@@ -214,10 -214,10 +214,10 @@@ static int http_options(const char *var #endif #if LIBCURL_VERSION_NUM >= 0x070908 if (!strcmp("http.sslcapath", var)) - return git_config_string(&ssl_capath, var, value); + return git_config_pathname(&ssl_capath, var, value); #endif if (!strcmp("http.sslcainfo", var)) - return git_config_string(&ssl_cainfo, var, value); + return git_config_pathname(&ssl_cainfo, var, value); if (!strcmp("http.sslcertpasswordprotected", var)) { ssl_cert_password_required = git_config_bool(var, value); return 0; @@@ -464,17 -464,6 +464,17 @@@ static CURL *get_curl_handle(void if (curl_http_proxy) { curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy); +#if LIBCURL_VERSION_NUM >= 0x071800 + if (starts_with(curl_http_proxy, "socks5")) + curl_easy_setopt(result, + CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + else if (starts_with(curl_http_proxy, "socks4a")) + curl_easy_setopt(result, + CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A); + else if (starts_with(curl_http_proxy, "socks")) + curl_easy_setopt(result, + CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); +#endif } #if LIBCURL_VERSION_NUM >= 0x070a07 curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY); @@@ -1628,8 -1617,8 +1628,8 @@@ struct http_pack_request *new_http_pack if (prev_posn>0) { if (http_is_verbose) fprintf(stderr, - "Resuming fetch of pack %s at byte %ld\n", - sha1_to_hex(target->sha1), prev_posn); + "Resuming fetch of pack %s at byte %"PRIuMAX"\n", + sha1_to_hex(target->sha1), (uintmax_t)prev_posn); http_opt_request_remainder(preq->slot->curl, prev_posn); } @@@ -1783,8 -1772,8 +1783,8 @@@ struct http_object_request *new_http_ob if (prev_posn>0) { if (http_is_verbose) fprintf(stderr, - "Resuming fetch of object %s at byte %ld\n", - hex, prev_posn); + "Resuming fetch of object %s at byte %"PRIuMAX"\n", + hex, (uintmax_t)prev_posn); http_opt_request_remainder(freq->slot->curl, prev_posn); }