about summary refs log tree commit homepage
path: root/script
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 /script
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 'script')
-rwxr-xr-xscript/public-inbox-convert6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/public-inbox-convert b/script/public-inbox-convert
index bd8fb985..99480c3a 100755
--- a/script/public-inbox-convert
+++ b/script/public-inbox-convert
@@ -103,7 +103,7 @@ while (<$rd>) {
                 $state = 'blob';
         } elsif (/^commit /) {
                 $state = 'commit';
-        } elsif (/^data (\d+)/) {
+        } elsif (/^data ([0-9]+)/) {
                 my $len = $1;
                 $w->print($_) or $im->wfail;
                 while ($len) {
@@ -114,7 +114,7 @@ while (<$rd>) {
                 }
                 next;
         } elsif ($state eq 'commit') {
-                if (m{^M 100644 :(\d+) (${h}{2}/${h}{38})}o) {
+                if (m{^M 100644 :([0-9]+) (${h}{2}/${h}{38})}o) {
                         my ($mark, $path) = ($1, $2);
                         $D{$path} = $mark;
                         if ($last && $last ne 'm') {
@@ -134,7 +134,7 @@ while (<$rd>) {
                         $last = 'd';
                         next;
                 }
-                if (m{^from (:\d+)}) {
+                if (m{^from (:[0-9]+)}) {
                         $prev = $from;
                         $from = $1;
                         # no next