patman: Avoid touching the system or local config

Set the git variables to ensure that any local gitconfig is not used or
affected by the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-10 13:05:01 +02:00
parent dd16f0e262
commit c9efedfc2f

View File

@@ -109,6 +109,9 @@ class TestCommon:
Returns:
pygit2.Repository: repository
"""
os.environ['GIT_CONFIG_GLOBAL'] = '/dev/null'
os.environ['GIT_CONFIG_SYSTEM'] = '/dev/null'
repo = pygit2.init_repository(self.gitdir)
self.repo = repo
new_tree = repo.TreeBuilder().write()