]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
patman: Avoid touching the system or local config
authorSimon Glass <sjg@chromium.org>
Sat, 10 May 2025 11:05:01 +0000 (13:05 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 27 May 2025 09:07:42 +0000 (10:07 +0100)
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>
tools/patman/test_common.py

index bc27b2d3ceff7c75e3a2431896d5ebd2035e145d..7da995dda2291db05223fd7924057b512d3db94c 100644 (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()