]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Git.pm
searchidx: index "diff --git a/... b/..." headers
[public-inbox.git] / lib / PublicInbox / Git.pm
index 374a3b4dd71d9849aea7a1c7dee2e8d2e2d8d1f6..309f80dbfcf001e51f130cddee1a14ee38303dd3 100644 (file)
@@ -71,7 +71,7 @@ sub new {
 
 sub git_path ($$) {
        my ($self, $path) = @_;
-       $self->{-git_path}->{$path} ||= do {
+       $self->{-git_path}->{$path} //= do {
                local $/ = "\n";
                chomp(my $str = $self->qx(qw(rev-parse --git-path), $path));
 
@@ -158,7 +158,8 @@ sub my_read ($$$) {
                        return; # unrecoverable error
                }
        }
-       \substr($$rbuf, 0, $len, '');
+       my $no_pad = substr($$rbuf, 0, $len, '');
+       \$no_pad;
 }
 
 sub my_readline ($$) {