1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 18:26:08 +02:00

http: expand http.cookieFile as a path

This should handle .gitconfig files that specify things like:

[http]
	cookieFile = "~/.gitcookies"

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brian Norris 2016-05-04 11:42:15 -07:00 committed by Junio C Hamano
parent 06ea368bb1
commit e5a39ad8e6
2 changed files with 3 additions and 2 deletions

View File

@ -1598,7 +1598,8 @@ http.proxy::
remote.<name>.proxy
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]).

2
http.c
View File

@ -258,7 +258,7 @@ static int http_options(const char *var, const char *value, void *cb)
return git_config_string(&curl_http_proxy, 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;