]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiBlob.pm
lei: use standard warn() in more places
[public-inbox.git] / lib / PublicInbox / LeiBlob.pm
index 3158ca3beffda3ce8d4a2c0d473324f26e750f5d..a3ddbbcec211c1916033a36608bede6e442db4ef 100644 (file)
@@ -32,7 +32,7 @@ sub solver_user_cb { # called by solver when done
        my $lei = $self->{lei};
        my $log_buf = delete $lei->{'log_buf'};
        $$log_buf =~ s/^/# /sgm;
-       ref($res) eq 'ARRAY' or return $lei->child_error(1 << 8, $$log_buf);
+       ref($res) eq 'ARRAY' or return $lei->child_error(0, $$log_buf);
        $lei->qerr($$log_buf);
        my ($git, $oid, $type, $size, $di) = @$res;
        my $gd = $git->{git_dir};
@@ -40,7 +40,7 @@ sub solver_user_cb { # called by solver when done
        # don't try to support all the git-show(1) options for non-blob,
        # this is just a convenience:
        $type ne 'blob' and
-               $lei->err("# $oid is a $type of $size bytes in:\n#\t$gd");
+               warn "# $oid is a $type of $size bytes in:\n#\t$gd\n";
 
        my $cmd = [ 'git', "--git-dir=$gd", 'show', $oid ];
        my $rdr = { 1 => $lei->{1}, 2 => $lei->{2} };
@@ -133,8 +133,7 @@ sub lei_blob {
                }
                my $ce = $?;
                return if $ce == 0;
-               my $sto = $lei->_lei_store;
-               my $lms = $sto ? $sto->search->lms : undef;
+               my $lms = $lei->lms;
                if (my $bref = $lms ? $lms->local_blob($blob, 1) : undef) {
                        defined($lei->{-attach_idx}) and
                                return extract_attach($lei, $blob, $bref);