Skip to content

Commit e5a39ad

Browse files
computersforpeacegitster
authored andcommitted
http: expand http.cookieFile as a path
This should handle .gitconfig files that specify things like: [http] cookieFile = "~/.gitcookies" Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 06ea368 commit e5a39ad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Documentation/config.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,8 @@ http.proxy::
15981598
remote.<name>.proxy
15991599

16001600
http.cookieFile::
1601-
File containing previously stored cookie lines which should be used
1601+
The pathname of a file containing previously stored cookie lines,
1602+
which should be used
16021603
in the Git http session, if they match the server. The file format
16031604
of the file to read cookies from should be plain HTTP headers or
16041605
the Netscape/Mozilla cookie file format (see linkgit:curl[1]).

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static int http_options(const char *var, const char *value, void *cb)
258258
return git_config_string(&curl_http_proxy, var, value);
259259

260260
if (!strcmp("http.cookiefile", var))
261-
return git_config_string(&curl_cookie_file, var, value);
261+
return git_config_pathname(&curl_cookie_file, var, value);
262262
if (!strcmp("http.savecookies", var)) {
263263
curl_save_cookies = git_config_bool(var, value);
264264
return 0;

0 commit comments

Comments
 (0)