about summary refs log tree commit homepage
path: root/lib/PublicInbox/Git.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2019-06-09 00:53:29 +0000
committerEric Wong <e@80x24.org>2019-06-10 04:58:04 +0000
commitd3c94cf92e8a4693aa691f3464c94c00be543cfc (patch)
tree0417c54de09e8a74f5bdfb6127972332f93f8aa9 /lib/PublicInbox/Git.pm
parent0886c264b24b8bc7626e5a7eb59598b0229f066d (diff)
downloadpublic-inbox-d3c94cf92e8a4693aa691f3464c94c00be543cfc.tar.gz
git: ensure ->modified returns an integer
We don't want to serialize timestamps as strings to JSON.
I only noticed this bug on a 32-bit system.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r--lib/PublicInbox/Git.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 68445b3c..82510b99 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -320,7 +320,7 @@ sub modified ($) {
                 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;