Skip to content

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.

2 participants