From: Jeff King <peff@peff.net>
To: Alex Kuleshov <kuleshovmail@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 1/1] git-config: git-config --list fixed when GIT_CONFIG value starts with ~/
Date: Fri, 14 Nov 2014 15:04:20 -0500 [thread overview]
Message-ID: <20141114200419.GB11581@peff.net> (raw)
In-Reply-To: <87vbmh8syq.fsf@gmail.com>
On Sat, Nov 15, 2014 at 01:38:36AM +0600, Alex Kuleshov wrote:
> > Yeah, I'd agree it is a little unexpected to expand here. The "~" is
> > mostly a shell thing, and doing:
> >
> > GIT_CONFIG=~/.gitconfig git config --list
> >
> > from the shell generally works, because the shell will expand the "~"
> > before it even hits git. If you're not using a shell to set the
> > variable, you probably should be pre-expanding it yourself.
>
> Yes, you're right here, but i put GIT_CONFIG=~/.gitconfig to my .bashrc
> and it doesn't work so.
Weird. It seems to work fine for me (though I admit I only did a pretty
cursory test).
> > Probably the right place would be the if/else chain around
> > builtin/config.c:514, where we convert a relative path into an absolute
> > one. But I'm not convinced it's a good thing to be doing in the first
> > place.
> >
> What if we'll put path expanding right after getting value of file path,
> after given_config_source.file = getenv(CONFIG_ENVIRONMENT); at 451?
That is a good place to put it if you want to impact $GIT_CONFIG but not
"--file". I am not sure if that is sensible. But then, I am not sure
that I am convinced that we should be making any change at all.
-Peff
next prev parent reply other threads:[~2014-11-14 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 18:29 [PATCH 1/1] git-config: git-config --list fixed when GIT_CONFIG value starts with ~/ 0xAX
2014-11-14 19:19 ` Eric Sunshine
2014-11-14 19:30 ` Jeff King
2014-11-14 19:38 ` Alex Kuleshov
2014-11-14 20:04 ` Jeff King [this message]
2014-11-14 20:10 ` 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=20141114200419.GB11581@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=kuleshovmail@gmail.com \
--cc=sunshine@sunshineco.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).