From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] patman: separate emails in CC list with NULs
Date: Fri, 18 Oct 2019 11:21:37 -0700 [thread overview]
Message-ID: <20191018182137.GA107046@dtor-ws> (raw)
There is a contributor in Linux kernel with a comma in their name, which
confuses patman and results in invalid to- or cc- addresses on some
patches. To avoid this, let's use \0 as a separator when generating cc
file.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
tools/patman/patman.py | 2 +-
tools/patman/series.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 9605a36eff..0187ebe1d4 100755
--- a/tools/patman/patman.py
+++ b/tools/patman/patman.py
@@ -112,7 +112,7 @@ elif options.cc_cmd:
for line in fd.readlines():
match = re_line.match(line)
if match and match.group(1) == args[0]:
- for cc in match.group(2).split(', '):
+ for cc in match.group(2).split('\0'):
cc = cc.strip()
if cc:
print(cc)
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 67103f03e6..d667d9b6d6 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -243,13 +243,13 @@ class Series(dict):
if limit is not None:
cc = cc[:limit]
all_ccs += cc
- print(commit.patch, ', '.join(sorted(set(cc))), file=fd)
+ print(commit.patch, '\0'.join(sorted(set(cc))), file=fd)
self._generated_cc[commit.patch] = cc
if cover_fname:
cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
cover_cc = [tools.FromUnicode(m) for m in cover_cc]
- cc_list = ', '.join([tools.ToUnicode(x)
+ cc_list = '\0'.join([tools.ToUnicode(x)
for x in sorted(set(cover_cc + all_ccs))])
print(cover_fname, cc_list.encode('utf-8'), file=fd)
--
Dmitry
next reply other threads:[~2019-10-18 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 18:21 Dmitry Torokhov [this message]
2019-10-22 0:17 ` [U-Boot] [PATCH] patman: separate emails in CC list with NULs Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191018182137.GA107046@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox