Skip to content

Commit

Permalink
[backend] also diff plain tar files
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 11, 2017
1 parent 3a5d5b8 commit 124683e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/backend/BSSrcdiff.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ sub srcdiff {
} else {
$d .= "\n++++++ $f (new)\n";
}
if ($opts{'doarchive'} && $f =~ /\.(?:tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
if ($opts{'doarchive'} && $f =~ /\.(?:tar|tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
if (defined $of) {
my @r = tardiff(fn($pold, $of), fn($pnew, $f), %opts);
for my $r (@r) {
Expand Down Expand Up @@ -1096,7 +1096,7 @@ sub unifieddiff {
} else {
$d .= "Index: $f\n" . ("=" x 67) . "\n";
}
if ($opts{'doarchive'} && $f =~ /\.(?:tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
if ($opts{'doarchive'} && $f =~ /\.(?:tar|tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
my @r = tardiff(fn($pold, $of), fn($pnew, $f), %opts);
for my $r (@r) {
$d .= adddiffheader($r, "$r->{'name'}$orevb", "$r->{'name'}$revb");
Expand All @@ -1108,7 +1108,7 @@ sub unifieddiff {
}
for my $f (@added) {
$d .= "Index: $f\n" . ("=" x 67) . "\n";
if ($opts{'doarchive'} && $f =~ /\.(?:tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
if ($opts{'doarchive'} && $f =~ /\.(?:tar|tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
my @r = tardiff(undef, fn($pnew, $f), %opts);
for my $r (@r) {
$d .= adddiffheader($r, "$r->{'name'} (added)", "$r->{'name'}$revb");
Expand Down Expand Up @@ -1145,7 +1145,7 @@ sub datadiff {
delete $r->{'state'};
push @added, {'state' => 'added', 'diff' => $r, 'new' => {'name' => $f, 'md5' => $new->{$f}, 'size' => $s[7]}};
} elsif ($old->{$of} ne $new->{$f}) {
if ($opts{'doarchive'} && $f =~ /\.(?:tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
if ($opts{'doarchive'} && $f =~ /\.(?:tar|tgz|tar\.gz|tar\.bz2|tbz|tar\.xz|gem|obscpio|livebuild)$/) {
my @r = tardiff(fn($pold, $of), fn($pnew, $f), %opts);
if (@r == 0 && $f ne $of) {
# (almost) identical tars but renamed
Expand Down

0 comments on commit 124683e

Please sign in to comment.