aboutsummaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorFei Shao2023-09-08 22:15:59 +0800
committerSimon Glass2023-09-23 09:00:37 -0600
commitce8cb76c7cf5cadf9d4b6293df8fbede74535d93 (patch)
treed8eed604d7be87eb9f7c9d58545f174a5cbd4c22 /tools/patman
parent92271d61045944cc05194a1defbd8ecb2ab00460 (diff)
patman: Respect include directive on Git config lookup
People may put their user name and email in a local config file and reference it by the include.* directives, however `git config --global` doesn't look up the included configs by default. Enable the --includes option explicitly to support such use cases. Signed-off-by: Fei Shao <fshao@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/gitutil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 6700057359f..b0a12f2e8c0 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -651,7 +651,7 @@ def get_default_user_name():
Returns:
User name found in .gitconfig file, or None if none
"""
- uname = command.output_one_line('git', 'config', '--global', 'user.name')
+ uname = command.output_one_line('git', 'config', '--global', '--includes', 'user.name')
return uname
@@ -661,7 +661,7 @@ def get_default_user_email():
Returns:
User's email found in .gitconfig file, or None if none
"""
- uemail = command.output_one_line('git', 'config', '--global', 'user.email')
+ uemail = command.output_one_line('git', 'config', '--global', '--includes', 'user.email')
return uemail