Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Configuration overrides via environment variable

From: David Symonds <hidden>
Date: 2016-06-15 22:44:08

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help