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

Fugitive-specific git config #2235

Open
igbanam opened this issue Nov 8, 2023 · 4 comments
Open

Fugitive-specific git config #2235

igbanam opened this issue Nov 8, 2023 · 4 comments

Comments

@igbanam
Copy link

igbanam commented Nov 8, 2023

Is there a way to pass some git configurations through to fugitive?

I'd like fugitive to use git without color — to avoid the weird color character embellishments in Vim — but have got with colour elsewhere.

The git config is color.ui = false. So I am looking for some configuration which would make fugitive run

git -c color.ui=false some-command

…whenever I run :GSomeCommand in fugitive.

Is this possible? If so, how so?

Thanks

@tpope
Copy link
Owner

tpope commented Nov 8, 2023

You could probably stick options in g:fugitive_git_executable. But you don't need that for this: Set color.ui to auto and Git will only use color when connected to a terminal.

@tpope tpope closed this as completed Nov 8, 2023
@tpope
Copy link
Owner

tpope commented Nov 8, 2023

Also note that we do force the color options to false in most invocations of git, because color.ui=always is a common mistake. What command is giving you color escape escape sequences?

@igbanam
Copy link
Author

igbanam commented Nov 9, 2023

Thanks for the suggestions!

I get the color escape sequences when I push. When I push, there's a link to create a PR. This link is colored. I'd like it to not be.

@tpope
Copy link
Owner

tpope commented Nov 9, 2023

I get the color escape sequences when I push. When I push, there's a link to create a PR. This link is colored. I'd like it to not be.

Git doesn't do anything like this. It must be coming from the server. Which means it can't/won't respect Git options. 😔

@tpope tpope reopened this Nov 9, 2023
@igbanam igbanam changed the title Fugitive-specific git confif Fugitive-specific git config Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants