Merge branch 'cb/ssl-config-pathnames' into maint
authorJeff King <peff@peff.net>
Tue, 1 Dec 2015 22:21:01 +0000 (17:21 -0500)
committerJeff King <peff@peff.net>
Tue, 1 Dec 2015 22:21:01 +0000 (17:21 -0500)
Allow tilde-expansion in some http config variables.

* cb/ssl-config-pathnames:
http: treat config options sslCAPath and sslCAInfo as paths

1  2 
http.c
diff --combined http.c
index f0a5c05bc7a12dd4307b77856a6653fee1e80602,0bce727f138356af156e18a6de734b1a41bb5e15..c29ce81ccc0432a80ac5d228d975f246ca47f4b4
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -215,10 -215,10 +215,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;
@@@ -465,17 -465,6 +465,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);