patman: Untangle settings from gitutil

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>
This commit is contained in:
Simon Glass 2025-04-07 22:51:43 +12:00
parent f9b84f9141
commit e70fdbd7e4
2 changed files with 4 additions and 3 deletions

View 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):

View 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)