patman: separate emails in CC list with NULs
PATCH 1/1 patman: separate emails in CC list with NULs
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 <[email protected]>
--- tools/patman/patman.py | 2 +- tools/patman/series.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/patman/patman.py +1 -1
@@ -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)
tools/patman/series.py +2 -2
@@ -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)
Signature · 1 line
Dmitry
PATCH 1/1 patman: separate emails in CC list with NULs
Hi Dmitry,
Quoted 11 lines · Dmitry Torokhov
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 <[email protected]>--- tools/patman/patman.py | 2 +- tools/patman/series.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
This is a good change, but please can you update the tests?
patman --test
Regards,
Simon