From b5ddcb3352ef31aeb03b4c4cbb04af3de34a4c4f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 28 Mar 2020 00:56:04 +0000 Subject: index: support --compact / -c on command-line It's more convenient to specify `-c' / `--compact' on the command-line when reindexing than it is to invoke public-inbox-compact(1) separately. This is especially convenient in low-space situations when public-inbox-index is operating on multiple inboxes sequentially, as compaction can happen immediately after indexing each inbox, instead of waiting until all inboxes are indexed. --- lib/PublicInbox/InboxWritable.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/InboxWritable.pm') diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm index e684f546..ce979ea2 100644 --- a/lib/PublicInbox/InboxWritable.pm +++ b/lib/PublicInbox/InboxWritable.pm @@ -19,6 +19,7 @@ use constant { sub new { my ($class, $ibx, $creat_opt) = @_; + return $ibx if ref($ibx) eq $class; my $self = bless $ibx, $class; # TODO: maybe stop supporting this -- cgit v1.2.3-24-ge0c7