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

Erik Helin ehelin at openjdk.java.net
Wed Feb 3 09:19:45 UTC 2021

On Tue, 2 Feb 2021 13:50:56 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> @magicus thanks for contributing! What do you think about adding a unit test to `RepositoryTests.java`?
> @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.


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

More information about the skara-dev mailing list