git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Symonds" <dsymonds@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: Configuration overrides via environment variable
Date: Mon, 28 Jan 2008 12:08:10 +1100	[thread overview]
Message-ID: <ee77f5c20801271708k124dc9d7n942b3c95299cb7fb@mail.gmail.com> (raw)

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?


Dave.

             reply	other threads:[~2008-01-28  1:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-28  1:08 David Symonds [this message]
2008-01-28 20:58 ` Configuration overrides via environment variable Jan Hudec
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=ee77f5c20801271708k124dc9d7n942b3c95299cb7fb@mail.gmail.com \
    --to=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).