about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-04-19 07:41:22 +0000
committerEric Wong <e@80x24.org>2019-05-06 19:12:15 +0000
commitce18b29d175ef5f01f05d59c95bcf8e0cd40e611 (patch)
tree576188ca61f8a2533e0d153baf7d66472a8921c8 /lib/PublicInbox/V2Writable.pm
parente1ed79d1e99e2c58b3edb370e60904cf656dd823 (diff)
downloadpublic-inbox-ce18b29d175ef5f01f05d59c95bcf8e0cd40e611.tar.gz
This can help users track down the source of warnings
when presented with imperfect emails.

While we're at it, make the __WARN__ callback in t/v2writable.t
a no-op since we don't check for warnings, there.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 6829a343..87e8f3eb 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -72,6 +72,7 @@ sub new {
                 im => undef, #  PublicInbox::Import
                 parallel => 1,
                 transact_bytes => 0,
+                current_info => '',
                 xpfx => $xpfx,
                 over => PublicInbox::OverIdx->new("$xpfx/over.sqlite3", 1),
                 lock_path => "$dir/inbox.lock",
@@ -949,8 +950,10 @@ sub index_sync {
                 my $fh = $self->{reindex_pipe} = $git->popen(@cmd, $range);
                 my $cmt;
                 while (<$fh>) {
+                        chomp;
+                        $self->{current_info} = "$i.git $_";
                         if (/\A$x40$/o && !defined($cmt)) {
-                                chomp($cmt = $_);
+                                $cmt = $_;
                         } elsif (/\A:\d{6} 100644 $x40 ($x40) [AM]\tm$/o) {
                                 $self->reindex_oid($mm_tmp, $D, $git, $1,
                                                 $regen, $reindex);