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

Supply all of the _specific_ color options too #728

Merged

Conversation

nevinera
Copy link
Contributor

@nevinera nevinera commented Jun 1, 2024

Previously, we were supplying color.ui=false, but if the local gitconfig specified any of the more specific options (like color.diff), those would take precedence. This updates our command-runner to always supply all of the specific color options as false as well, so that we definitely get a color-free output suitable for parsing.

Updating the fixture causes several of the existing specs to fail without the code changes (especially the diff tests), which is probably an appropriate level of testing - I doubt all of these config options are actually necessary, but I don't see any harm in including them.

This should replace #723, since that won't be necessary anymore. We don't currently have any tests checking the actual contents of the commands being run, but I could rig up a test that supplies a .git/config.

Previously, we were supplying `color.ui=false`, but if the local
gitconfig specified any of the more specific options (like
`color.diff`), those would take precedence. This updates our
command-runner to always supply all of the specific color options as
false as well, so that we definitely get a color-free output suitable
for parsing.
@nevinera nevinera marked this pull request as ready for review June 1, 2024 03:11
Copy link
Member

@jcouball jcouball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this seems to do the trick. Looks great!

@jcouball jcouball merged commit dd8e8d4 into ruby-git:master Jun 1, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants