about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiToMail.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-16 11:13:16 +0000
committerEric Wong <e@80x24.org>2023-12-16 13:06:34 +0000
commit84874a852c80e3d4eb96af14c017b37424cdf840 (patch)
tree0cec1caed43b36491860fe30e2622c00d5db4f06 /lib/PublicInbox/LeiToMail.pm
parent478f66df2924dcd84d3ba78235a9086429a3305c (diff)
downloadpublic-inbox-84874a852c80e3d4eb96af14c017b37424cdf840.tar.gz
lei: use ->child_error API properly
I noticed this bug while developing another feature and tests
were getting SIGHUP (since SIGHUP == 1 on most systems).
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r--lib/PublicInbox/LeiToMail.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index a930fc30..071ba113 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -147,9 +147,9 @@ sub git_to_mail { # git->cat_async callback
                         $type = 'blob';
                         $size = length($$bref);
                 }
-                $type eq 'blob' or return $self->{lei}->child_error(1,
+                $type eq 'blob' or return $self->{lei}->child_error(0,
                                                 "W: $oid is $type (!= blob)");
-                $size or return $self->{lei}->child_error(1,"E: $oid is empty");
+                $size or return $self->{lei}->child_error(0,"E: $oid is empty");
                 $smsg->{blob} eq $oid or die "BUG: expected=$smsg->{blob}";
                 $self->{wcb}->($bref, $smsg);
         };