Whitespace at the start of first line of commit

Jakub Jelinek jakub@redhat.com
Tue Jan 14 11:01:00 GMT 2020


Hi!

I've noticed that a couple of Jason's commits show up in gcc-cvs
in mutt as:
[gcc r10-5937] ?PR c++/92582 - ICE with member template as requirement.
The ? in there comes from a tab character, the full subject is like
Subject: =?utf-8?q?=5Bgcc_r10-5937=5D_=09PR_c++/92582_-_ICE_with_member_template_a?=
 =?utf-8?q?s_requirement=2E?=

One possibility to deal with this is:
--- hooks/updates/__init__.py	2020-01-12 22:30:37.143193572 +0100
+++ hooks/updates/__init__.py	2020-01-14 11:20:05.746749843 +0100
@@ -315,7 +315,7 @@ class AbstractUpdate(object):
         subject = '[%(repo)s%(branch)s] %(subject)s' % {
             'repo': self.email_info.project_name,
             'branch': branch,
-            'subject': commit.subject[:SUBJECT_MAX_SUBJECT_CHARS],
+            'subject': commit.subject[:SUBJECT_MAX_SUBJECT_CHARS].strip (),
             }
 
         # Generate the body of the email in two pieces:
(untested), another, suggested by Richard on IRC, would be to reject
commits where the first line starts with whitespace.

So, what do we want to do here?

	Jakub



More information about the Gcc mailing list