RFR: 868: Skara should ignore .gitconfig and /etc/gitconfig

Magnus Ihse Bursie ihse at openjdk.java.net
Wed Feb 3 09:46:54 UTC 2021


On Wed, 3 Feb 2021 09:17:38 GMT, Erik Helin <ehelin at openjdk.org> wrote:

>> @edvbld What exactly do you propose to test in the unit test? This is really solving a problem with the environment -- the tests fail when I run as my user due to conflicting modifications in my `~/.gitconfig`. I can't really modify the users personal gitconfig file in a unit test. The only thing I could really think if is verifying that `git config -l` is empty. Hm, maybe that's a good idea...
>
> @magicus can't you run a test that asserts that `user.name` is empty? Almost everyone configures `user.name` (Git sort-of requires it for commits). In a CI environment the test will of course be trivially correct since we never setup `user.name`, but the test will be accurate when run on developer's personal machines.

If `user.name` is set, then `git config -l` will not be empty. :)

-------------

PR: https://git.openjdk.java.net/skara/pull/997


More information about the skara-dev mailing list