[PATCH 12/20] patman: Use git to set up the test config

Simon Glass sjg at chromium.org
Thu May 8 09:28:36 CEST 2025


At present the branch information is dropped when writing the
configuration. It is easier to get git to set up the config anyway, so
update the test to do this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/patman/func_test.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 61df82312ba..d055a7e5952 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -448,6 +448,11 @@ Changes in v2:
         self.repo = repo
         new_tree = repo.TreeBuilder().write()
 
+        common = ['git', f'--git-dir={self.gitdir}', 'config']
+        tools.run(*(common + ['user.name', 'Dummy']), cwd=self.gitdir)
+        tools.run(*(common + ['user.email', 'dumdum at dummy.com']),
+                  cwd=self.gitdir)
+
         # pylint doesn't seem to find this
         # pylint: disable=E1101
         author = pygit2.Signature('Test user', 'test at email.com')
-- 
2.43.0



More information about the U-Boot mailing list