Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Preserve Colors #33

Open
Swivelgames opened this issue Oct 1, 2017 · 3 comments
Open

Feature: Preserve Colors #33

Swivelgames opened this issue Oct 1, 2017 · 3 comments

Comments

@Swivelgames
Copy link

Is it possible to preserve the colors that git outputs on it's own? It definitely makes a big difference when reading through the output when managing numerous repos.

@fabioz
Copy link
Owner

fabioz commented Oct 2, 2017

If you use the serial mode this works -- unfortunately this is lost when running in parallel because of the buffering... I'm not sure there's a good way around it as apparently when running in that mode (without a real tty behind it) git will not give that itself (so, given that to fake it to appear as it's running in a real terminal is probably a huge amount of work, I'm really tempted to close this as there's a workaround -- running serial -- unless someone has an idea of a better approach or a library which can do this).

@matejcik
Copy link

it's pretty easy actually: you can force git to use colors regardless. just launch with git -c color.ui=always, if you have os.isatty
(this is also a possible workaround for the issue: git config --global color.ui always will force colors on and that will keep through mu status etc)

to do it completely properly, you'd have to read git's config of the value and respect other values than "auto"
but i think it's reasonable to make colors an option of mu itself

@rocketraman
Copy link

(this is also a possible workaround for the issue: git config --global color.ui always will force colors on and that will keep through mu status etc)

To do this without changing the global config, use mu itself to set this config for each "managed" repo:

mu config color.ui always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants