about summary refs log tree commit homepage
path: root/lib/PublicInbox/Git.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-05 01:26:55 +0000
committerEric Wong <e@80x24.org>2019-06-05 01:26:55 +0000
commit2984ff86d913c3a9a9f53e67e141f7a39bf77160 (patch)
treea4d3263b0a3e33122e1e1e1317a6c010b022d7f8 /lib/PublicInbox/Git.pm
parentf90225afaef139a5e82b3083b7bdcb6abf0e7c1e (diff)
downloadpublic-inbox-2984ff86d913c3a9a9f53e67e141f7a39bf77160.tar.gz
While I don't expect git to suddenly start spewing non-ASCII
digits in places I'd expect ASCII, this would make things easier
for future hackers and reviewers.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r--lib/PublicInbox/Git.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 9014e021..68445b3c 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -141,7 +141,7 @@ again:
                 }
                 return;
         }
-        $head =~ /^[0-9a-f]{40} \S+ (\d+)$/ or
+        $head =~ /^[0-9a-f]{40} \S+ ([0-9]+)$/ or
                 fail($self, "Unexpected result from git cat-file: $head");
 
         my $size = $1;
@@ -319,7 +319,7 @@ sub modified ($) {
         foreach my $oid (<$fh>) {
                 chomp $oid;
                 my $buf = cat_file($self, $oid) or next;
-                $$buf =~ /^committer .*?> (\d+) [\+\-]?\d+/sm or next;
+                $$buf =~ /^committer .*?> ([0-9]+) [\+\-]?[0-9]+/sm or next;
                 my $cmt_time = $1;
                 $modified = $cmt_time if $cmt_time > $modified;
         }