about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-11-15 09:21:43 +0000
committerEric Wong <e@80x24.org>2023-11-16 10:56:52 +0000
commit2c472f1f571ae55155c78bcbc4d420d06266ba63 (patch)
treee123822123dada4eb5c39822480e483c1ac2e0c4 /lib/PublicInbox/V2Writable.pm
parent95de492d3ca723fe81ec3bd23d89b643ce98823e (diff)
downloadpublic-inbox-2c472f1f571ae55155c78bcbc4d420d06266ba63.tar.gz
We should be able to treat v2 outputs just like any other mail
format, with the exception that content dedupe is always
enforced by the v2 format.

This allows users hosting v2 public-inboxes to catch up broken
synchronization from alternate archives such as the mbox
archives hosted by https://lists.gnu.org/

Link: https://public-inbox.org/meta/20231114-hypersonic-papaya-starling-e1cfc8@nitro/
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 4d606dfe..231ed516 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -135,7 +135,7 @@ sub add {
         if (do_idx($self, $mime, $smsg)) {
                 $self->checkpoint;
         }
-
+        ++$self->{-nr_add}; # for lei convert
         $cmt;
 }
 
@@ -611,6 +611,7 @@ sub done {
         $self->lock_release(!!$nbytes) if $shards;
         $self->git->cleanup;
         die $err if $err;
+        delete $self->{-nr_add}; # for lei-convert
 }
 
 sub importer {