Re: Configuration overrides via environment variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux