]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Apply the cc limit to the cover letter also
authorSimon Glass <sjg@chromium.org>
Fri, 28 Feb 2020 01:49:23 +0000 (18:49 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 16 Apr 2020 14:07:58 +0000 (08:07 -0600)
Quite often on a series that has clean-up patches, the individual patches
may fit within the cc limit but the cover letter does not. Apply the same
limit to the cover letter.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
tools/patman/series.py

index a15f7625edcf29ca0b9138878f81e788ab1ea5ca..6d9d48b1233a467ef2b52339fedf49fc50c99fd2 100644 (file)
@@ -249,8 +249,10 @@ class Series(dict):
         if cover_fname:
             cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
             cover_cc = [tools.FromUnicode(m) for m in cover_cc]
-            cc_list = '\0'.join([tools.ToUnicode(x)
-                                 for x in sorted(set(cover_cc + all_ccs))])
+            cover_cc = list(set(cover_cc + all_ccs))
+            if limit is not None:
+                cover_cc = cover_cc[:limit]
+            cc_list = '\0'.join([tools.ToUnicode(x) for x in sorted(cover_cc)])
             print(cover_fname, cc_list, file=fd)
 
         fd.close()