Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330095
b: refs/heads/master
c: fa64205
h: refs/heads/master
i:
  330093: 3b8cc8b
  330091: a81f564
  330087: 4bf0252
  330079: 3eb0cda
v: v3
  • Loading branch information
Pasi Savanainen authored and Linus Torvalds committed Oct 5, 2012
1 parent 740d348 commit 5283469
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8290e2d2dcbf0d379d4b1379e17916515ee20a39
refs/heads/master: fa64205df9dfd7b7662cc64a7e82115c00e428e5
15 changes: 12 additions & 3 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,8 @@ sub process {
my $in_header_lines = 1;
my $in_commit_log = 0; #Scanning lines before patch

my $non_utf8_charset = 0;

our @report = ();
our $cnt_lines = 0;
our $cnt_error = 0;
Expand Down Expand Up @@ -1686,10 +1688,17 @@ sub process {
$in_commit_log = 1;
}

# Still not yet in a patch, check for any UTF-8
if ($in_commit_log && $realfile =~ /^$/ &&
# Check if there is UTF-8 in a commit log when a mail header has explicitly
# declined it, i.e defined some charset where it is missing.
if ($in_header_lines &&
$rawline =~ /^Content-Type:.+charset="(.+)".*$/ &&
$1 !~ /utf-8/i) {
$non_utf8_charset = 1;
}

if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ &&
$rawline =~ /$NON_ASCII_UTF8/) {
CHK("UTF8_BEFORE_PATCH",
WARN("UTF8_BEFORE_PATCH",
"8-bit UTF-8 used in possible commit log\n" . $herecurr);
}

Expand Down

0 comments on commit 5283469

Please sign in to comment.