]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-convert
tighten up digit matches to ASCII for git output
[public-inbox.git] / script / public-inbox-convert
index bd8fb9855b1eeee7617553c54845340afa2a458c..99480c3a8808f4fe4a19c0d8f7bb171bc752a45a 100755 (executable)
@@ -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