Recognize files in $XDG_CONFIG_HOME/git/ and $HOME/.config/git/ better#2067
Conversation
|
Would be great if you could add a couple of integration tests for this change, see tests/integration_test.rs |
|
I wrote a test, but I'm not quite sure why it's failing. Probably some funky stuff going on with the ANSI escape codes. Help needed. |
|
Okay I think I fixed the test. It is some weird ANSI colour escape sequence issue that I don't really understand. Please verify that the test is effective. Thanks. |
There was a problem hiding this comment.
Big thanks for adding tests. Automated tests are so great to have. With automated tests in place I consider this Approved (assuming you handle remaining comments). We could argue about if we want to define functions in functions, but I don't think it matters much with automated tests in place. Because then we can easily change that later. But I have to admit the diff is nice right now.
It would be great if you could add an entry in the CHANGELOG.md before we merge. See https://github.com/sharkdp/bat/blob/master/CONTRIBUTING.md
|
I did a rebase against the newest |
Co-authored-by: Martin Nordholts <enselic@gmail.com>
$XDG_CONFIG_HOME/git/ and $HOME/.config/git/ better
Related issue: #1191
When #1191 was fixed, the implementation was incomplete. More specifically, it did not cover the case when
$XDG_CONFIG_HOMEis not set or empty, as specified ingit-configdocumentation.This PR fixes that.