-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much
$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_HOME
is not set or empty, as specified ingit-config
documentation.This PR fixes that.