about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index bfa7a805..3df7d98f 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -519,11 +519,12 @@ sub purge_oids {
                         push @buf, $buf;
                 } elsif (/^M 100644 ([a-f0-9]+) (\w+)/) {
                         my ($oid, $path) = ($1, $2);
+                        $tree->{$path} = 1;
                         if ($purge->{$oid}) {
                                 push @oids, $oid;
-                                delete $tree->{$path};
+                                my $cmd = "M 100644 inline $path\ndata 0\n\n";
+                                push @buf, $cmd;
                         } else {
-                                $tree->{$path} = 1;
                                 push @buf, $_;
                         }
                 } elsif (/^D (\w+)/) {