X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FImport.pm;h=29c482f9b4339b09089421723f3991b24e57f553;hb=cf35d38e7f845393659dfce0249a76d529a2c92c;hp=bfa7a8053297a50c44c5e1f4fe173fbd7f882bbf;hpb=9294716ecc685c7b21ec21e2dbbbeb2c8f62c477;p=public-inbox.git
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index bfa7a805..29c482f9 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2018 all contributors
+# Copyright (C) 2016-2019 all contributors
# License: AGPL-3.0+
#
# git fast-import-based ssoma-mda MDA replacement
@@ -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+)/) {
@@ -634,8 +635,8 @@ version 1.0
=head1 DESCRIPTION
An importer and remover for public-inboxes which takes L
-messages as input and stores them in a ssoma repository as
-documented in L,
+messages as input and stores them in a git repository as
+documented in L,
except it does not allow duplicate Message-IDs.
It requires L and L to be installed.