Don't complain about MIME headers.

When patches contain extended character sets, patches will contain
MIME headers after the subject line, which should not be confused
for a too-long summary line.

Signed-off-by: Gregory Bean <gbean@codeaurora.org>
Change-Id: If17d17cc7513eb644d75f486b9cdea3a09ba0dbe
(cherry picked from commit 8e6b9d3790595198a34320f1c3f4504cd258fed1)
This commit is contained in:
Gregory Bean 2011-03-03 13:46:41 -08:00 committed by Stephen Boyd
parent fa3e178ef5
commit b4bea2d7a9

View file

@ -1628,13 +1628,20 @@ sub process {
" characters\n" . $herecurr); " characters\n" . $herecurr);
} }
} elsif ($shorttext == CHECK_NEXT_SHORTTEXT) { } elsif ($shorttext == CHECK_NEXT_SHORTTEXT) {
$shorttext = IN_SHORTTEXT; # The Subject line doesn't have to be the last header in the patch.
# Avoid moving to the IN_SHORTTEXT state until clear of all headers.
# Per RFC5322, continuation lines must be folded, so any left-justified
# text which looks like a header is definitely a header.
if ($line!~/^[\x21-\x39\x3b-\x7e]+:/) {
$shorttext = IN_SHORTTEXT;
# Check for Subject line followed by a blank line. # Check for Subject line followed by a blank line.
if (length($line) != 0) { if (length($line) != 0) {
WARN("non-blank line after summary " . WARN("non-blank line after " .
"line\n" . $sublinenr . $here . "summary line\n" .
"\n" . $subjectline . "\n" . $sublinenr . $here .
$line . "\n"); "\n" . $subjectline .
"\n" . $line . "\n");
}
} }
} elsif ($line=~/^Subject: \[[^\]]*\] (.*)/) { } elsif ($line=~/^Subject: \[[^\]]*\] (.*)/) {
$shorttext = CHECK_NEXT_SHORTTEXT; $shorttext = CHECK_NEXT_SHORTTEXT;