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

Fix fg/bg extraction with l.t. 2 colors #414

Merged
merged 1 commit into from Jun 26, 2021

Conversation

gramosg
Copy link
Contributor

@gramosg gramosg commented Jun 20, 2021

Hi, this PR fixes a bug I found because I have a configuration like this:

[color "diff"]
        old = red strike

In short, it wasn't considered the case where 1) less than 2 colors are specified, with 2) at least one modifier different from bold or reverse.

The bug can be reproduced by setting git config color.diff.old "red strike" in test/test_helper/util.bash and running the test suite, but I'm not familiar enough with bats to add a regression test, as it seems to affect the configuration before the tests run.

I hope it is useful :)

@gramosg gramosg changed the base branch from master to next June 25, 2021 19:21
@gramosg
Copy link
Contributor Author

gramosg commented Jun 25, 2021

Update: just realized about the next branch; I've already edited the PR (was targeting master).

@scottchiefbaker
Copy link
Contributor

Looks good! All the tests still pass, and this will make us more resilient in the future. Thanks!

@scottchiefbaker scottchiefbaker merged commit 84aa638 into so-fancy:next Jun 26, 2021
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.

None yet

2 participants