@@ -135,13 +135,16 @@ sub annotate
135
135
s /\015 $// ;
136
136
137
137
if ($line =~
138
- m / ^(\S +)[^(] +\( <([^>]+ )>\s +([-0-9]+\s +[0-9:]+\s +[-+0-9]+)\s +([0-9]+)\) (.*)$ /
138
+ m / ^(\S +)[^(] +\( <([^>]* )>\s +([-0-9]+\s +[0-9:]+\s +[-+0-9]+)\s +([0-9]+)\) (.*)$ /
139
139
) {
140
140
my $commit = $1 ;
141
- my $owner = $2 ;
141
+ my $owner = $2 ; # apparently, this can be empty
142
142
my $when = $3 ;
143
143
my $text = $5 ;
144
144
145
+ # found empty name in .../clang/include/AST/StmtOpenMP.h
146
+ $owner =
' [email protected] ' unless $owner ;
147
+
145
148
if ($self -> [P4]) {
146
149
if (!exists ($changelists {$commit })) {
147
150
if (
@@ -195,13 +198,17 @@ sub annotate
195
198
# so use it as a delimiter
196
199
push (@lines ,
197
200
[$text , $owner , $fullname , $when , $commit ]);
198
- die (" no uniform match$context " )
199
- if defined ($matched ) && !$matched ;
201
+ # expect all lines to eitehr match the git blame regexp
202
+ # or none of them to match
203
+ die (" $basename has both matching and not matching lines$context "
204
+ ) if defined ($matched ) && !$matched ;
200
205
$matched = 1;
201
206
} else {
202
207
push (@lines , [$line , " NONE" , undef , " NONE" , " NONE" ]);
203
- die (" no uniform match$context " )
204
- if defined ($matched ) && $matched ;
208
+ # expect all lines to eitehr match the git blame regexp
209
+ # or none of them to match
210
+ die (" $basename has both not matching and matching lines$context "
211
+ ) if defined ($matched ) && $matched ;
205
212
$matched = 0;
206
213
}
207
214
}
0 commit comments