summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-07-18 14:23:20 +0900
committerSimon Glass <sjg@chromium.org>2014-07-28 04:57:24 +0100
commitee860c60d2c5283c009f7ea740c6ee706da87cb7 (patch)
tree10012e2a055b57c8ca95324b40c01e64c1e3ea87 /tools/patman
parent189a496825aefe7c8e9be80c0f2a4cf5923d4f55 (diff)
downloadu-boot-imx-ee860c60d2c5283c009f7ea740c6ee706da87cb7.zip
u-boot-imx-ee860c60d2c5283c009f7ea740c6ee706da87cb7.tar.gz
u-boot-imx-ee860c60d2c5283c009f7ea740c6ee706da87cb7.tar.bz2
patman: make "No recipient" checking more tolerant
If Series-to tag is missing, Patman exits with a message "No recipient". This is just annoying for those who had already added sendemail.to configuration. I guess many developers have [sendemail] to = u-boot@lists.denx.de in their .git/config because the 'To: u-boot@lists.denx.de' field should always be added when sending patches. That seems more reasonable rather than adding 'Series-to: u-boot@lists.denx.de' to every patch series. Patman should exit only when both Series-to tag and sendemail.to configuration are mising. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/gitutil.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 7b75c83..65754f5 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -377,9 +377,14 @@ def EmailPatches(series, cover_fname, args, dry_run, raise_on_error, cc_fname,
"""
to = BuildEmailList(series.get('to'), '--to', alias, raise_on_error)
if not to:
- print ("No recipient, please add something like this to a commit\n"
- "Series-to: Fred Bloggs <f.blogs@napier.co.nz>")
- return
+ git_config_to = command.Output('git', 'config', 'sendemail.to')
+ if not git_config_to:
+ print ("No recipient.\n"
+ "Please add something like this to a commit\n"
+ "Series-to: Fred Bloggs <f.blogs@napier.co.nz>\n"
+ "Or do something like this\n"
+ "git config sendemail.to u-boot@lists.denx.de")
+ return
cc = BuildEmailList(series.get('cc'), '--cc', alias, raise_on_error)
if self_only:
to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)