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:
@@ -109,6 +109,9 @@ class TestCommon:
|
|||||||
Returns:
|
Returns:
|
||||||
pygit2.Repository: repository
|
pygit2.Repository: repository
|
||||||
"""
|
"""
|
||||||
|
os.environ['GIT_CONFIG_GLOBAL'] = '/dev/null'
|
||||||
|
os.environ['GIT_CONFIG_SYSTEM'] = '/dev/null'
|
||||||
|
|
||||||
repo = pygit2.init_repository(self.gitdir)
|
repo = pygit2.init_repository(self.gitdir)
|
||||||
self.repo = repo
|
self.repo = repo
|
||||||
new_tree = repo.TreeBuilder().write()
|
new_tree = repo.TreeBuilder().write()
|
||||||
|
|||||||
Reference in New Issue
Block a user