]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
patman: Untangle settings from gitutil
authorSimon Glass <sjg@chromium.org>
Mon, 7 Apr 2025 10:51:43 +0000 (22:51 +1200)
committerSimon Glass <sjg@chromium.org>
Tue, 27 May 2025 09:07:41 +0000 (10:07 +0100)
The gitutil module is supposed to be independent from patman but one
piece was missed in the series which separated them.

Move the settings setup out of gitutil

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/control.py
tools/u_boot_pylib/gitutil.py

index cfea35ea648cc16eb899f827586d907b65e5f05c..fbf368cb2fa77d7fdbcbd5a5b547b43f1f3bcc20 100644 (file)
@@ -26,11 +26,15 @@ from patman import checkpatch
 from patman import patchstream
 from patman import patchwork
 from patman import send
+from patman import settings
 
 
 def setup():
     """Do required setup before doing anything"""
     gitutil.setup()
+    alias_fname = gitutil.get_alias_file()
+    if alias_fname:
+        settings.ReadGitAliases(alias_fname)
 
 
 def do_send(args):
index 0376bece3e6fcba8e8021ee1cc4aab668cd0a494..8935b6cc847aba6d7f0c0cf9cd7e241d9d9e2da5 100644 (file)
@@ -693,9 +693,6 @@ def setup():
     # Check for a git alias file also
     global USE_NO_DECORATE
 
-    alias_fname = get_alias_file()
-    if alias_fname:
-        settings.ReadGitAliases(alias_fname)
     cmd = log_cmd(None, count=0)
     USE_NO_DECORATE = (command.run_one(*cmd, raise_on_error=False)
                        .return_code == 0)