Merge branch 'bn/http-cookiefile-config' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 31 May 2016 21:08:28 +0000 (14:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 May 2016 21:08:28 +0000 (14:08 -0700)
"http.cookieFile" configuration variable clearly wants a pathname,
but we forgot to treat it as such by e.g. applying tilde expansion.

* bn/http-cookiefile-config:
http: expand http.cookieFile as a path
Documentation: config: improve word ordering for http.cookieFile

1  2 
Documentation/config.txt
http.c
index d3a6de81d3ca08d6a9565acf01567807f5662455,3c0c48478e0efce977197e0cf19fa9dfef487ea9..b945d67bc00d9b6fea7ae805c7d0a9e1f5962b1a
@@@ -1633,47 -1593,17 +1633,48 @@@ help.htmlPath:
  
  http.proxy::
        Override the HTTP proxy, normally configured using the 'http_proxy',
 -      'https_proxy', and 'all_proxy' environment variables (see
 -      `curl(1)`).  This can be overridden on a per-remote basis; see
 -      remote.<name>.proxy
 +      'https_proxy', and 'all_proxy' environment variables (see `curl(1)`). In
 +      addition to the syntax understood by curl, it is possible to specify a
 +      proxy string with a user name but no password, in which case git will
 +      attempt to acquire one in the same way it does for other credentials. See
 +      linkgit:gitcredentials[7] for more information. The syntax thus is
 +      '[protocol://][user[:password]@]proxyhost[:port]'. This can be overridden
 +      on a per-remote basis; see remote.<name>.proxy
 +
 +http.proxyAuthMethod::
 +      Set the method with which to authenticate against the HTTP proxy. This
 +      only takes effect if the configured proxy string contains a user name part
 +      (i.e. is of the form 'user@host' or 'user@host:port'). This can be
 +      overridden on a per-remote basis; see `remote.<name>.proxyAuthMethod`.
 +      Both can be overridden by the 'GIT_HTTP_PROXY_AUTHMETHOD' environment
 +      variable.  Possible values are:
 ++
 +--
 +* `anyauth` - Automatically pick a suitable authentication method. It is
 +  assumed that the proxy answers an unauthenticated request with a 407
 +  status code and one or more Proxy-authenticate headers with supported
 +  authentication methods. This is the default.
 +* `basic` - HTTP Basic authentication
 +* `digest` - HTTP Digest authentication; this prevents the password from being
 +  transmitted to the proxy in clear text
 +* `negotiate` - GSS-Negotiate authentication (compare the --negotiate option
 +  of `curl(1)`)
 +* `ntlm` - NTLM authentication (compare the --ntlm option of `curl(1)`)
 +--
 +
 +http.emptyAuth::
 +      Attempt authentication without seeking a username or password.  This
 +      can be used to attempt GSS-Negotiate authentication without specifying
 +      a username in the URL, as libcurl normally requires a username for
 +      authentication.
  
  http.cookieFile::
-       File containing previously stored cookie lines which should be used
+       The pathname of a file containing previously stored cookie lines,
+       which should be used
        in the Git http session, if they match the server. The file format
        of the file to read cookies from should be plain HTTP headers or
 -      the Netscape/Mozilla cookie file format (see linkgit:curl[1]).
 +      the Netscape/Mozilla cookie file format (see `curl(1)`).
-       NOTE that the file specified with http.cookieFile is only used as
+       NOTE that the file specified with http.cookieFile is used only as
        input unless http.saveCookies is set.
  
  http.saveCookies::
diff --cc http.c
index 4304b80ad3ac9d8ae249bc0bc007074bc5aa6181,1b4520c626d1ecf6794ac19663da2d31f0f3172e..1044f9ba0e28ff825fa58c56d535861cd9f56a59
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -289,11 -257,8 +289,11 @@@ static int http_options(const char *var
        if (!strcmp("http.proxy", var))
                return git_config_string(&curl_http_proxy, var, value);
  
 +      if (!strcmp("http.proxyauthmethod", var))
 +              return git_config_string(&http_proxy_authmethod, var, value);
 +
        if (!strcmp("http.cookiefile", var))
-               return git_config_string(&curl_cookie_file, var, value);
+               return git_config_pathname(&curl_cookie_file, var, value);
        if (!strcmp("http.savecookies", var)) {
                curl_save_cookies = git_config_bool(var, value);
                return 0;