lib/PublicInbox/Git.pm | 2 +- t/www_listing.t | 1 + diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 68445b3cc28961379e763908e8b93b9d5f8e061a..82510b99641200bd014ffdc9d6a537ae22775220 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -320,7 +320,7 @@ foreach my $oid (<$fh>) { chomp $oid; my $buf = cat_file($self, $oid) or next; $$buf =~ /^committer .*?> ([0-9]+) [\+\-]?[0-9]+/sm or next; - my $cmt_time = $1; + my $cmt_time = $1 + 0; $modified = $cmt_time if $cmt_time > $modified; } $modified || time; diff --git a/t/www_listing.t b/t/www_listing.t index 2741e1b8b531db17084b5c2ed0bb3ff51e5bb8bd..1f2929808f54c21ab1dd73ddda4a7f600608029a 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -96,6 +96,7 @@ last if $n == 0; $body .= $buf; } IO::Uncompress::Gunzip::gunzip(\$body => \$tmp); + unlike($tmp, qr/"modified":\s*"/, 'modified is an integer'); my $manifest = $json->decode($tmp); ok(my $clone = $manifest->{'/alt'}, '/alt in manifest'); is($clone->{owner}, 'lorelei', 'owner set');