Merge branch 'bn/http-cookiefile-config'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:18 +0000 (14:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 May 2016 21:38:18 +0000 (14:38 -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

Documentation/config.txt
http.c
index 6e97e1e05e4912b5d0b80dc64f3fd683c41e7614..536b6e624a14ca275a702ca1f3f598fcdc9e6675 100644 (file)
@@ -1679,11 +1679,12 @@ http.extraHeader::
        config, an empty value will reset the extra headers to the empty list.
 
 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]).
-       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 --git a/http.c b/http.c
index 985b995c1d05b9a1ae461d6056e14e66b39d563c..6fe74d5eeafa0566cc7f19c8024ed0c82b55db77 100644 (file)
--- a/http.c
+++ b/http.c
@@ -294,7 +294,7 @@ static int http_options(const char *var, const char *value, void *cb)
                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;