From: Brian Norris <computersforpeace@gmail.com>
To: <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
Brian Norris <computersforpeace@gmail.com>
Subject: [PATCH v2 3/3] http: expand http.cookieFile as a path
Date: Wed, 4 May 2016 11:42:15 -0700 [thread overview]
Message-ID: <1462387335-57937-3-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1462387335-57937-1-git-send-email-computersforpeace@gmail.com>
This should handle .gitconfig files that specify things like:
[http]
cookieFile = "~/.gitcookies"
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
v2: rework documentation now that 'pathname' is documented centrally
Documentation/config.txt | 3 ++-
http.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index e655b9729a7d..4c3cd7621ad0 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1664,7 +1664,8 @@ http.emptyAuth::
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]).
diff --git a/http.c b/http.c
index 4304b80ad3ac..1044f9ba0e28 100644
--- a/http.c
+++ b/http.c
@@ -293,7 +293,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;
--
2.8.0.rc3.226.g39d4020
next prev parent reply other threads:[~2016-05-04 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 18:42 [PATCH v2 1/3] config: describe 'pathname' value type Brian Norris
2016-05-04 18:42 ` [PATCH v2 2/3] Documentation: config: improve word ordering for http.cookieFile Brian Norris
2016-05-04 18:42 ` Brian Norris [this message]
2016-05-04 19:30 ` [PATCH v2 3/3] http: expand http.cookieFile as a path Jeff King
2016-05-04 19:35 ` Brian Norris
2016-05-04 23:03 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462387335-57937-3-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).