]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SolverGit.pm
msg_iter: make ->each_part method for PublicInbox::MIME
[public-inbox.git] / lib / PublicInbox / SolverGit.pm
index f881e16e41c89cfdd74515401ad2b164394dde22..f718e28cbd55af423a4ad41d15c4e2a141ac55e2 100644 (file)
@@ -14,7 +14,7 @@ use 5.010_001;
 use File::Temp 0.19 (); # 0.19 for ->newdir
 use Fcntl qw(SEEK_SET);
 use PublicInbox::Git qw(git_unquote git_quote);
-use PublicInbox::MsgIter qw(msg_iter msg_part_text);
+use PublicInbox::MsgIter qw(msg_part_text);
 use PublicInbox::Qspawn;
 use PublicInbox::Tmpfile;
 use URI::Escape qw(uri_escape_utf8);
@@ -48,7 +48,7 @@ my %BAD_COMPONENT = ('' => 1, '.' => 1, '..' => 1);
 #      hdr_lines => string of various header lines for mode information
 #      mode_a => original mode of oid_a (string, not integer),
 #      ibx => PublicInbox::Inbox object containing the diff
-#      smsg => PublicInbox::SearchMsg object containing diff
+#      smsg => PublicInbox::Smsg object containing diff
 #      path_a => pre-image path
 #      path_b => post-image path
 #      n => numeric path of the patch (relative to worktree)
@@ -234,7 +234,7 @@ sub find_extract_diffs ($$$) {
        my $diffs = [];
        foreach my $smsg (@$msgs) {
                $ibx->smsg_mime($smsg) or next;
-               msg_iter(delete $smsg->{mime}, \&extract_diff,
+               delete($smsg->{mime})->each_part(\&extract_diff,
                                [$self, $diffs, $pre, $post, $ibx, $smsg], 1);
        }
        @$diffs ? $diffs : undef;