diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-04 21:24:58 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-04 21:54:42 +0000 |
commit | b4d127cb83230fe5cee0dcecb573107ad96a7c4c (patch) | |
tree | 764d61dc4043e368248165d75dd3dbd4312c2ce4 /lib/PublicInbox/V2Writable.pm | |
parent | 89537db2ca4b506a7b7500dcd7b7c5430a0a6dc7 (diff) | |
download | public-inbox-b4d127cb83230fe5cee0dcecb573107ad96a7c4c.tar.gz |
We do not need to rewrite old commits unaffected by the object_id purge, only newer commits. This was a state management bug :x We will also return the new commit ID of rewritten history to aid in incremental indexing of mirrors for the next change.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 479e2b5d..b6532ac5 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -224,11 +224,13 @@ sub purge_oids { my ($self, $purge) = @_; # $purge = { $object_id => 1, ... } $self->done; my $pfx = "$self->{-inbox}->{mainrepo}/git"; + my $purges = []; foreach my $i (0..$self->{max_git}) { my $git = PublicInbox::Git->new("$pfx/$i.git"); my $im = $self->import_init($git, 0); - $im->purge_oids($purge); + $purges->[$i] = $im->purge_oids($purge); } + $purges; } sub remove_internal { @@ -285,7 +287,7 @@ sub remove_internal { $self->barrier; } if ($purge && scalar keys %$purge) { - purge_oids($self, $purge); + return purge_oids($self, $purge); } $removed; } |