Commit ee860c60 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Simon Glass
Browse files

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 configuration.

I guess many developers have

          to =

in their .git/config because the 'To:' field
should always be added when sending patches.

That seems more reasonable rather than adding
'Series-to:' to every patch series.

Patman should exit only when both Series-to tag and
configuration are mising.
Signed-off-by: default avatarMasahiro Yamada <>
Cc: Simon Glass <>
Acked-by: default avatarSimon Glass <>
parent 189a4968
......@@ -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 <>")
git_config_to = command.Output('git', 'config', '')
if not git_config_to:
print ("No recipient.\n"
"Please add something like this to a commit\n"
"Series-to: Fred Bloggs <>\n"
"Or do something like this\n"
"git config")
cc = BuildEmailList(series.get('cc'), '--cc', alias, raise_on_error)
if self_only:
to = BuildEmailList([os.getenv('USER')], '--to', alias, raise_on_error)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment