Closed Syphdias closed 5 years ago
@dritter I'm confused. How is that not what is being done here? Which is why I deleted most of the setting resets.
I also added the test to ensure the user config modification doesn't happen again. This apparently failed on Mac OS...
Ha! I missed that line (folded away by github).
So I adjust my comment: I wouldn't trust git config --global
, and instead just write the config file directly to our newly created HOME folder.. ;)
Thanks @Syphdias .
Currently running the git unit tests unsets name and email in the global git config.
This PR gets rid of unnecessary variable juggling and simply sets the git config in the new home. The config (
/tmp/powerlevel9k-test/.gitconfig
) will be removed when the test directory is removed. I also added a "test" (which is a bit of a hack) to check if email or name were changed.PS: Teardowns are currently called an additional time (see https://github.com/kward/shunit2/issues/112 for details) after shunit finished all tests. It should be fine for now. Just a heads up since I stumbled upon this bug while testing.