1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-04 04:12:31 +01:00

Recognize files in $XDG_CONFIG_HOME/git/ and $HOME/.config/git/ better (#2067)

* git global config - lookup $XDG_CONFIG_HOME faithfully

* Use `bool::then`

* Cover both `$XDG_CONFIG_HOME` & `$HOME/.config`

* Remove unused import

* Global git config tests

* Added trailing newline

* Fix git config test

* Wrote to changelog

* Revert change of `Result::ok` to `Result::unwrap`

* Apply suggestions from code review

Co-authored-by: Martin Nordholts <enselic@gmail.com>

* Guard against empty `$HOME`

Co-authored-by: Martin Nordholts <enselic@gmail.com>
This commit is contained in:
cyqsimon
2022-02-27 00:01:00 +08:00
committed by GitHub
parent 36093dd3bc
commit 14ddda0a8b
5 changed files with 65 additions and 3 deletions

3
tests/examples/git/.gitconfig vendored Normal file
View File

@@ -0,0 +1,3 @@
[user]
email = foo@bar.net
name = foobar