From: Jan Hudec <bulb@ucw.cz>
To: David Symonds <dsymonds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Configuration overrides via environment variable
Date: Mon, 28 Jan 2008 21:58:37 +0100 [thread overview]
Message-ID: <20080128205837.GB5788@efreet.light.src> (raw)
In-Reply-To: <ee77f5c20801271708k124dc9d7n942b3c95299cb7fb@mail.gmail.com>
On Mon, Jan 28, 2008 at 12:08:10 +1100, David Symonds wrote:
> Hi,
>
> I'm using Git in some scripts, and wanted to get its colorised output
> even when it is not going to a tty. I don't want to permanently change
> ~/.gitconfig or the per-repo config; I just want to set color.status
> (and perhaps others) to "always" for a one-off run. I suppose I could
> munge the config files, storing the previous value and restoring it
> later, but that's messy.
>
> Ideally, an environment variable like GIT_EXTRA_CONFIG or something
> would be nice, so I could just do:
>
> GIT_EXTRA_CONFIG="color.status=always" git status | ...
>
> Thoughts? Does this already exist, and I've overlooked it?
Quickly looking at the git-config manpage, there does not seem to be a way to
provide alternate config file via GIT_CONFIG and/or GIT_CONFIG_LOCAL
variables. I don't know how good match for your problem that would be.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
next prev parent reply other threads:[~2008-01-28 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 1:08 Configuration overrides via environment variable David Symonds
2008-01-28 20:58 ` Jan Hudec [this message]
2008-01-28 22:58 ` Jakub Narebski
2008-01-28 23:11 ` David Symonds
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=20080128205837.GB5788@efreet.light.src \
--to=bulb@ucw.cz \
--cc=dsymonds@gmail.com \
--cc=git@vger.kernel.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).