@@ -121,7 +121,7 @@ sub filter_filenames {
121
121
foreach my $regex (@ignore_files_regex ) {
122
122
if ($filename =~ m /$regex / ) {
123
123
$res = 1;
124
- print " $filename is ignored per regex: " . $regex . " \n " unless $quiet ;
124
+ print " $filename is ignored per regex: " . $regex . " \n " if $debug && ! $quiet ;
125
125
}
126
126
}
127
127
@@ -192,17 +192,32 @@ sub diff_files_complete {
192
192
# things that changed are the version number and/or the
193
193
# generation date. We ignore the rest of the diff output at
194
194
# this point.
195
- if ($line =~ / \d +c\d +/ ) {
196
- if (!$is_attachment_dir ) {
197
- my ($ln_1 , $ln_2 ) = split /c/, $line , 2;
198
-
199
- if ($ln_1 eq $ln_2 && %{ $generated_by_lines }) {
200
- if ($ignore_footer ) {
201
- if ($ln_1 >= $footer_line ) {
195
+ if ($line =~ / ^\d / ) {
196
+ if ($line =~ / \d +c\d +/ ) {
197
+ if (!$is_attachment_dir ) {
198
+ my ($ln_1 , $ln_2 ) = split /c/, $line ;
199
+
200
+ # if we have diffs in a series of sequential lines
201
+ my ($ln_1_1 , $ln_1_2 ) = split /,/, $ln_1 ;
202
+ my ($ln_2_1 , $ln_2_2 ) = split /,/, $ln_2 ;
203
+
204
+ if (%{ $generated_by_lines }
205
+ && (defined $ln_1_2 && defined $ln_2_2
206
+ && ($ln_1_2 - $ln_1_1 ) == ($ln_2_1 - $ln_1_1 ))
207
+ || (defined $ln_1_1 && defined $ln_2_1
208
+ && !defined $ln_1_2 && !defined $ln_2_2 )) {
209
+
210
+ if ($ignore_footer ) {
211
+ if ($ln_1_1 >= $footer_line ) {
212
+ last ;
213
+ }
214
+ } elsif ((!defined $ln_1_2
215
+ && $$generated_by_lines {$ln_1_1 })
216
+ || (defined $ln_1_2
217
+ && $$generated_by_lines {$ln_1_1 }
218
+ && $$generated_by_lines {$ln_1_2 })) {
202
219
last ;
203
220
}
204
- } elsif ($$generated_by_lines {$ln_1 }) {
205
- last ;
206
221
}
207
222
}
208
223
}
@@ -215,7 +230,7 @@ sub diff_files_complete {
215
230
if ($diffs ne " " && !$quiet ) {
216
231
$errors ++;
217
232
print " \n " if $show_progress ;
218
- print " [$errors ] $filename1 \n [$errors ] $filename2 : found $local_errors difference" . ($errors == 1 ? " " : " s" ) . " \n " ;
233
+ print " [$errors ] $filename1 \n [$errors ] $filename2 : found $local_errors difference" . ($local_errors == 1 ? " " : " s" ) . " \n " ;
219
234
print " $diffs \n " ;
220
235
}
221
236
@@ -274,12 +289,12 @@ sub process_options {
274
289
$dir1 = abs_path ($dir1 );
275
290
$dir2 = abs_path ($dir2 );
276
291
277
- if (!-d $dir1 ) {
278
- die (" $dir1 is not a directory\n " );
292
+ if (!defined $dir1 || ! -d $dir1 ) {
293
+ die (" $ARGV [0] is not a directory\n " );
279
294
}
280
295
281
- if (!-d $dir2 ) {
282
- die (" $dir2 is not a directory\n " );
296
+ if (!defined $dir2 || ! -d $dir2 ) {
297
+ die (" $ARGV [1] is not a directory\n " );
283
298
}
284
299
285
300
if (defined $options {i }) {
@@ -321,7 +336,7 @@ sub process_options {
321
336
print " \n " unless $quiet ;
322
337
323
338
if ($errors ) {
324
- print " => $dir1 and $dir2 differ ( $errors difference " , $errors > 1 ? " s" : " " , " ) \n\n " unless $quiet ;
339
+ print " => $dir1 and $dir2 dirs differ: $errors file " , $errors > 1 ? " s are " : " is " , " different \n\n " unless $quiet ;
325
340
} else {
326
341
print " => Archives are identical\n\n " unless $quiet ;
327
342
}
0 commit comments