about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-30 01:20:44 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-30 01:21:09 +0000
commit66e91d22b9899aaf5baea05b5e1652a35472b966 (patch)
tree0332714db560c413ee6367128459a777ab7f9d40 /lib/PublicInbox/V2Writable.pm
parent4790a0dbd7b297e087713c6ff2e63bf7deee4d04 (diff)
downloadpublic-inbox-66e91d22b9899aaf5baea05b5e1652a35472b966.tar.gz
This is consistent with how we internally generate new
Message-IDs to break conflicts and allows ->reindex to
succeed while walking backwards through history
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 269b028f..34f13e26 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -137,7 +137,7 @@ sub num_for {
                 warn "<$mid> reused for mismatched content\n";
 
                 # try the rest of the mids
-                foreach my $i (1..$#$mids) {
+                for(my $i = $#$mids; $i >= 1; $i--) {
                         my $m = $mids->[$i];
                         $num = $self->{skel}->{mm}->mid_insert($m);
                         if (defined $num) {