lib/PublicInbox/SearchIdx.pm | 2 +- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 67272997b22149faf3db8b9018a86ac8569f83ae..1d0d926f28164a29a904643bdc0cacdc7218fc22 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -337,7 +337,7 @@ my $log = $git->popen(qw/log --reverse --no-notes --no-color --raw -r --no-abbrev/, $range); my $latest; my $bytes; - while (my $line = <$log>) { + while (defined(my $line = <$log>)) { if ($line =~ /$addmsg/o) { my $mime = do_cat_mail($git, $1, \$bytes) or next; $add_cb->($self, $git, $mime, $bytes);