]> Sergey Matveev's repositories - public-inbox.git/commit
inbox: simplify v2 epoch counting
authorEric Wong <e@80x24.org>
Wed, 16 Dec 2020 23:19:04 +0000 (23:19 +0000)
committerEric Wong <e@80x24.org>
Thu, 17 Dec 2020 19:41:14 +0000 (19:41 +0000)
commitdbf250d9423ccc38377c35eef8d43e3e11723253
tree9d29ec1355eae9bb8e46981ecd181074f4809cf8
parent519f80bb052a446ffa604a0862a631d846f64468
inbox: simplify v2 epoch counting

Perl readdir detects list context and can return an array
suitable for the grep op.  From there, we can rely on
substr to remove the ".git" suffix and integerize the value
to save a few bytes before letting List::Util::max return
the value.

This is how we detect Xapian shards nowadays, too, and
we'll also use defined-or (//) to simplify the return
value there.

We'll also simplify InboxWritable->git_dir_latest,
remove some callers, and consider removing it entirely.
lib/PublicInbox/ExtSearchIdx.pm
lib/PublicInbox/Inbox.pm
lib/PublicInbox/InboxWritable.pm
lib/PublicInbox/Search.pm
lib/PublicInbox/V2Writable.pm
lib/PublicInbox/Xapcmd.pm