git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Brian Norris <computersforpeace@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] http: expand http.cookieFile as a path
Date: Fri, 29 Apr 2016 13:16:31 -0400	[thread overview]
Message-ID: <20160429171631.GA29571@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqziscz6ej.fsf@gitster.mtv.corp.google.com>

On Fri, Apr 29, 2016 at 10:11:48AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > I'm not sure if it's a good idea to go into so much detail about
> > expand_user_path() here. There are a lot of options that use the same
> > rules, and we probably don't want to go into a complete explanation
> > inside each option's description. Is there a canonical definition of how
> > we do expansion in config.txt that we can just reference (and if not,
> > can we add one)?
> 
> We have a dedicated section for various value-types used in the
> configuration variables already, because we needed to describe how
> booleans and scaled integers can be spelled, and the pathname type
> would fit there.
> 
>  Documentation/config.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 59d7046..1bf42a6 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -169,6 +169,11 @@ thing on the same output line (e.g. opening parenthesis before the
>  list of branch names in `log --decorate` output) is set to be
>  painted with `bold` or some other attribute.
>  
> +pathname::
> +	A variable that takes a pathname value can be given a
> +	string that begins with "~/" or "~user/", and the usual
> +	tilde expansion happens to such a string.
> +
>  
>  Variables
>  ~~~~~~~~~

Yeah, this is what I had in mind. My only reservation would be that we
need to make sure it is clear that this applies only to keys marked as
taking a "pathname" type in the documentation. I'm suspect there are
ones that are logically paths but do not currently do the expansion, but
the wording above makes it sound like any pathname-like thing does.

Alternatively, it might be worth going through the list to make sure all
paths use git_config_pathname() internally. Brian asked earlier if the
"no expansion" was an intentional policy, but it's not. It's just that
pathname expansion came much later, and config keys were ported over to
it one by one as people found it useful to do so.

-Peff

  reply	other threads:[~2016-04-29 17:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  6:23 [PATCH 1/2] Documentation: config: improve word ordering for http.cookieFile Brian Norris
2016-04-29  6:23 ` [PATCH 2/2] http: expand http.cookieFile as a path Brian Norris
2016-04-29 14:12   ` Jeff King
2016-04-29 15:55     ` Brian Norris
2016-04-29 17:48       ` Junio C Hamano
2016-04-29 17:49         ` Jeff King
2016-04-29 17:55           ` Junio C Hamano
2016-04-29 17:56             ` Jeff King
2016-04-29 17:52         ` Junio C Hamano
2016-04-29 17:11     ` Junio C Hamano
2016-04-29 17:16       ` Jeff King [this message]
2016-04-29 17:27         ` 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=20160429171631.GA29571@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=computersforpeace@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).