{"thread":{"id":"42218","subject":"[PATCH v2 2/3] Documentation: config: improve word ordering for http.cookieFile","startedAt":"2016-05-04T18:42:13Z","lastAt":"2016-05-04T23:03:13Z","messageCount":6,"participants":["Brian Norris","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":3},"messages":[{"id":"285486","messageId":"1462387335-57937-1-git-send-email-computersforpeace@gmail.com","threadId":"42218","inReplyTo":null,"subject":"[PATCH v2 1/3] config: describe 'pathname' value type","fromName":"Brian Norris","fromEmail":"computersforpeace@gmail.com","sentAt":"2016-05-04T18:42:13Z","receivedAt":"2016-05-04T18:42:13Z","isPatch":true,"sender":{"key":"computersforpeace@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2268082?v=4"},"body":"From: Junio C Hamano <gitster@pobox.com>\n\nWe have a dedicated section for various value-types used in the\nconfiguration variables already, because we needed to describe how\nbooleans and scaled integers can be spelled, and the pathname type\nwould fit there.\n\nAdjust the description of `include.path`, `core.excludesFile`, and\n`commit.template` variables to clarify that the variables are of this\ntype.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Brian Norris <computersforpeace@gmail.com>\n---\nv2: new\n\n Documentation/config.txt | 30 +++++++++++++++++++-----------\n 1 file changed, 19 insertions(+), 11 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 42d2b50477b2..7264abf7f85e 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -81,13 +81,16 @@ Includes\n \n You can include one config file from another by setting the special\n `include.path` variable to the name of the file to be included. The\n+variable takes a pathname as its value, and is subject to tilde\n+expansion.\n+\n+The\n included file is expanded immediately, as if its contents had been\n found at the location of the include directive. If the value of the\n `include.path` variable is a relative path, the path is considered to be\n relative to the configuration file in which the include directive was\n-found. The value of `include.path` is subject to tilde expansion: `~/`\n-is expanded to the value of `$HOME`, and `~user/` to the specified\n-user's home directory. See below for examples.\n+found.  See below for examples.\n+\n \n Example\n ~~~~~~~\n@@ -169,6 +172,13 @@ thing on the same output line (e.g. opening parenthesis before the\n list of branch names in `log --decorate` output) is set to be\n painted with `bold` or some other attribute.\n \n+pathname::\n+\tA variable that takes a pathname value can be given a\n+\tstring that begins with \"`~/`\" or \"`~user/`\", and the usual\n+\ttilde expansion happens to such a string: `~/`\n+\tis expanded to the value of `$HOME`, and `~user/` to the\n+\tspecified user's home directory.\n+\n \n Variables\n ~~~~~~~~~\n@@ -593,11 +603,10 @@ be delta compressed, but larger binary media files won't be.\n Common unit suffixes of 'k', 'm', or 'g' are supported.\n \n core.excludesFile::\n-\tIn addition to '.gitignore' (per-directory) and\n-\t'.git/info/exclude', Git looks into this file for patterns\n-\tof files which are not meant to be tracked.  \"`~/`\" is expanded\n-\tto the value of `$HOME` and \"`~user/`\" to the specified user's\n-\thome directory. Its default value is $XDG_CONFIG_HOME/git/ignore.\n+\tSpecifies the pathname to the file that contains patterns to\n+\tdescribe paths that are not meant to be tracked, in addition\n+\tto '.gitignore' (per-directory) and '.git/info/exclude'.\n+\tDefaults to $XDG_CONFIG_HOME/git/ignore.\n \tIf $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore\n \tis used instead. See linkgit:gitignore[5].\n \n@@ -1106,9 +1115,8 @@ commit.status::\n \tmessage.  Defaults to true.\n \n commit.template::\n-\tSpecify a file to use as the template for new commit messages.\n-\t\"`~/`\" is expanded to the value of `$HOME` and \"`~user/`\" to the\n-\tspecified user's home directory.\n+\tSpecify the pathname of a file to use as the template for\n+\tnew commit messages.\n \n credential.helper::\n \tSpecify an external helper to be called when a username or\n-- \n2.8.0.rc3.226.g39d4020\n"},{"id":"285484","messageId":"1462387335-57937-2-git-send-email-computersforpeace@gmail.com","threadId":"42218","inReplyTo":"1462387335-57937-1-git-send-email-computersforpeace@gmail.com","subject":"[PATCH v2 2/3] Documentation: config: improve word ordering for http.cookieFile","fromName":"Brian Norris","fromEmail":"computersforpeace@gmail.com","sentAt":"2016-05-04T18:42:14Z","receivedAt":"2016-05-04T18:42:14Z","isPatch":true,"sender":{"key":"computersforpeace@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2268082?v=4"},"body":"Signed-off-by: Brian Norris <computersforpeace@gmail.com>\n---\nv2: no change\n\n Documentation/config.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 7264abf7f85e..e655b9729a7d 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1668,7 +1668,7 @@ http.cookieFile::\n \tin the Git http session, if they match the server. The file format\n \tof the file to read cookies from should be plain HTTP headers or\n \tthe Netscape/Mozilla cookie file format (see linkgit:curl[1]).\n-\tNOTE that the file specified with http.cookieFile is only used as\n+\tNOTE that the file specified with http.cookieFile is used only as\n \tinput unless http.saveCookies is set.\n \n http.saveCookies::\n-- \n2.8.0.rc3.226.g39d4020\n"},{"id":"285485","messageId":"1462387335-57937-3-git-send-email-computersforpeace@gmail.com","threadId":"42218","inReplyTo":"1462387335-57937-1-git-send-email-computersforpeace@gmail.com","subject":"[PATCH v2 3/3] http: expand http.cookieFile as a path","fromName":"Brian Norris","fromEmail":"computersforpeace@gmail.com","sentAt":"2016-05-04T18:42:15Z","receivedAt":"2016-05-04T18:42:15Z","isPatch":true,"sender":{"key":"computersforpeace@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2268082?v=4"},"body":"This should handle .gitconfig files that specify things like:\n\n[http]\n\tcookieFile = \"~/.gitcookies\"\n\nSigned-off-by: Brian Norris <computersforpeace@gmail.com>\n---\nv2: rework documentation now that 'pathname' is documented centrally\n\n Documentation/config.txt | 3 ++-\n http.c                   | 2 +-\n 2 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex e655b9729a7d..4c3cd7621ad0 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1664,7 +1664,8 @@ http.emptyAuth::\n \tauthentication.\n \n http.cookieFile::\n-\tFile containing previously stored cookie lines which should be used\n+\tThe pathname of a file containing previously stored cookie lines,\n+\twhich should be used\n \tin the Git http session, if they match the server. The file format\n \tof the file to read cookies from should be plain HTTP headers or\n \tthe Netscape/Mozilla cookie file format (see linkgit:curl[1]).\ndiff --git a/http.c b/http.c\nindex 4304b80ad3ac..1044f9ba0e28 100644\n--- a/http.c\n+++ b/http.c\n@@ -293,7 +293,7 @@ static int http_options(const char *var, const char *value, void *cb)\n \t\treturn git_config_string(&http_proxy_authmethod, var, value);\n \n \tif (!strcmp(\"http.cookiefile\", var))\n-\t\treturn git_config_string(&curl_cookie_file, var, value);\n+\t\treturn git_config_pathname(&curl_cookie_file, var, value);\n \tif (!strcmp(\"http.savecookies\", var)) {\n \t\tcurl_save_cookies = git_config_bool(var, value);\n \t\treturn 0;\n-- \n2.8.0.rc3.226.g39d4020\n"},{"id":"285497","messageId":"20160504193051.GF21259@sigill.intra.peff.net","threadId":"42218","inReplyTo":"1462387335-57937-3-git-send-email-computersforpeace@gmail.com","subject":"Re: [PATCH v2 3/3] http: expand http.cookieFile as a path","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-04T19:30:51Z","receivedAt":"2016-05-04T19:30:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 04, 2016 at 11:42:15AM -0700, Brian Norris wrote:\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index e655b9729a7d..4c3cd7621ad0 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -1664,7 +1664,8 @@ http.emptyAuth::\n>  \tauthentication.\n>  \n>  http.cookieFile::\n> -\tFile containing previously stored cookie lines which should be used\n> +\tThe pathname of a file containing previously stored cookie lines,\n> +\twhich should be used\n>  \tin the Git http session, if they match the server. The file format\n>  \tof the file to read cookies from should be plain HTTP headers or\n>  \tthe Netscape/Mozilla cookie file format (see linkgit:curl[1]).\n\nI think we usually re-wrap paragraphs when adding to the documentation,\nbut I do not have a strong opinion (and certainly understand the reasons\nfor not doing so).\n\nThe whole series looks fine to me. Thanks.\n\n-Peff\n"},{"id":"285499","messageId":"20160504193531.GA62336@google.com","threadId":"42218","inReplyTo":"20160504193051.GF21259@sigill.intra.peff.net","subject":"Re: [PATCH v2 3/3] http: expand http.cookieFile as a path","fromName":"Brian Norris","fromEmail":"computersforpeace@gmail.com","sentAt":"2016-05-04T19:35:31Z","receivedAt":"2016-05-04T19:35:31Z","isPatch":true,"sender":{"key":"computersforpeace@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2268082?v=4"},"body":"On Wed, May 04, 2016 at 03:30:51PM -0400, Jeff King wrote:\n> On Wed, May 04, 2016 at 11:42:15AM -0700, Brian Norris wrote:\n> \n> > diff --git a/Documentation/config.txt b/Documentation/config.txt\n> > index e655b9729a7d..4c3cd7621ad0 100644\n> > --- a/Documentation/config.txt\n> > +++ b/Documentation/config.txt\n> > @@ -1664,7 +1664,8 @@ http.emptyAuth::\n> >  \tauthentication.\n> >  \n> >  http.cookieFile::\n> > -\tFile containing previously stored cookie lines which should be used\n> > +\tThe pathname of a file containing previously stored cookie lines,\n> > +\twhich should be used\n> >  \tin the Git http session, if they match the server. The file format\n> >  \tof the file to read cookies from should be plain HTTP headers or\n> >  \tthe Netscape/Mozilla cookie file format (see linkgit:curl[1]).\n> \n> I think we usually re-wrap paragraphs when adding to the documentation,\n> but I do not have a strong opinion (and certainly understand the reasons\n> for not doing so).\n\nI chose the wrapping mostly based on the diff suggestions y'all kindly\nprovided :)\n\nI can rewrap and resend if necessary.\n\n> The whole series looks fine to me. Thanks.\n\nThanks,\nBrian\n"},{"id":"285542","messageId":"xmqqwpn9ctou.fsf@gitster.mtv.corp.google.com","threadId":"42218","inReplyTo":"20160504193531.GA62336@google.com","subject":"Re: [PATCH v2 3/3] http: expand http.cookieFile as a path","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-05-04T23:03:13Z","receivedAt":"2016-05-04T23:03:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Norris <computersforpeace@gmail.com> writes:\n\n> On Wed, May 04, 2016 at 03:30:51PM -0400, Jeff King wrote:\n>> On Wed, May 04, 2016 at 11:42:15AM -0700, Brian Norris wrote:\n>> \n>> > diff --git a/Documentation/config.txt b/Documentation/config.txt\n>> > index e655b9729a7d..4c3cd7621ad0 100644\n>> > --- a/Documentation/config.txt\n>> > +++ b/Documentation/config.txt\n>> > @@ -1664,7 +1664,8 @@ http.emptyAuth::\n>> >  \tauthentication.\n>> >  \n>> >  http.cookieFile::\n>> > -\tFile containing previously stored cookie lines which should be used\n>> > +\tThe pathname of a file containing previously stored cookie lines,\n>> > +\twhich should be used\n>> >  \tin the Git http session, if they match the server. The file format\n>> >  \tof the file to read cookies from should be plain HTTP headers or\n>> >  \tthe Netscape/Mozilla cookie file format (see linkgit:curl[1]).\n>> \n>> I think we usually re-wrap paragraphs when adding to the documentation,\n>> but I do not have a strong opinion (and certainly understand the reasons\n>> for not doing so).\n>\n> I chose the wrapping mostly based on the diff suggestions y'all kindly\n> provided :)\n>\n> I can rewrap and resend if necessary.\n>\n>> The whole series looks fine to me. Thanks.\n\n\nIf the rewrite were a lot more extensive, then it no longer would make\nsense to refrain from rewrapping (which reduces the number of lines\neyes have to scan), but doing this without rewrapping I think\nstrikes a good balance.\n"}]}