diff options
author | Eric Wong <e@80x24.org> | 2020-11-23 07:05:55 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-11-24 05:03:55 +0000 |
commit | 9a7d37e6992ff598e2b53d78b2b0466a74c8b0f1 (patch) | |
tree | f9a62fc076064245d48375555727e07175ecf4df /lib/PublicInbox/Inbox.pm | |
parent | e917c6756d4912046aa6ad5130f6873d1873ddc7 (diff) | |
download | public-inbox-9a7d37e6992ff598e2b53d78b2b0466a74c8b0f1.tar.gz |
inbox: git_epoch: remove ->version check
If $epoch is supplied to this method, there's already epochs and an extra method call for ->version is a pointless waste of CPU cycles.
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r-- | lib/PublicInbox/Inbox.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 64b12345..a1a072ad 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -133,8 +133,7 @@ sub new { sub version { $_[0]->{version} // 1 } sub git_epoch { - my ($self, $epoch) = @_; - $self->version == 2 or return; + my ($self, $epoch) = @_; # v2-only, callers always supply $epoch $self->{"$epoch.git"} ||= do { my $git_dir = "$self->{inboxdir}/git/$epoch.git"; return unless -d $git_dir; |