git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Martin Waitz <tali@admingilde.org>
Cc: Matthias Lederhofer <matled@gmx.net>, git@vger.kernel.org
Subject: Re: [PATCH] Support environment variables in config file
Date: Mon, 4 Jun 2007 18:59:40 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706041856270.4046@racer.site> (raw)
In-Reply-To: <20070604174719.GH16637@admingilde.org>

Hi,

On Mon, 4 Jun 2007, Martin Waitz wrote:

> On Mon, Jun 04, 2007 at 04:57:35PM +0100, Johannes Schindelin wrote:
> > I actually would like it more if the calling program did the 
> > interpolation itself.
> 
> That's another possibility, perhaps along the line of git_config_int.

Maybe...

> > So, for example if you want a script to access whatever.my.url, and 
> > want to allow to interpolate any environment variable, why not
> > 
> > 	url=$(eval $(git config whatever.my.url))
> 
> Well, complete shell syntax does too much: it also supports $() and 
> friends.

Good point.

> > I am just hesitant to change the existing behaviour, and possibly 
> > introduce weird breakages. (There could even be some unwanted env 
> > leakages in programs like gitweb...)
> 
> exactly.
> 
> So should we simply update semantics of config variables to not require 
> any environment variables?

Well, actually there is a perfect example when you would want to do even 
more than just expanding environment variables: aliases.

I'm happy to understand the config as a relatively versatile key/value 
store, without much in the way of pre- or post-processing from git-config 
or git_config().

But if there are a few callers of git_config() which want environment 
variable interpolation, git_config_expand_envs() would be good.

Ciao,
Dscho

      reply	other threads:[~2007-06-04 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 22:37 [PATCH] Support environment variables in config file Martin Waitz
2007-06-04  5:34 ` Matthias Lederhofer
2007-06-04  7:27   ` Martin Waitz
2007-06-04  8:44     ` Matthias Lederhofer
2007-06-04 15:57     ` Johannes Schindelin
2007-06-04 17:47       ` Martin Waitz
2007-06-04 17:59         ` Johannes Schindelin [this message]

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=Pine.LNX.4.64.0706041856270.4046@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=matled@gmx.net \
    --cc=tali@admingilde.org \
    /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).