diff options
author | Eric Wong <e@80x24.org> | 2016-08-09 00:22:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-08-09 00:24:55 +0000 |
commit | ec483e30d9003530224cfb92d1657ad33d1db7da (patch) | |
tree | 18fd804069ad9211f0895ddd9e0da5a37eb07621 /lib/PublicInbox/SearchIdx.pm | |
parent | ce081052105f97bb324dc2ad0785d1aa45f2cbf9 (diff) | |
download | public-inbox-ec483e30d9003530224cfb92d1657ad33d1db7da.tar.gz |
We can cheaply keep the object around nowadays since it spawns expensive processes only on an as-needed basis.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 9a462c75..2c4e704d 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -44,6 +44,7 @@ sub new { my $umask = _umask_for($perm); $self->{umask} = $umask; $self->{lock_path} = "$git_dir/ssoma.lock"; + $self->{git} = PublicInbox::Git->new($git_dir); $self->{xdb} = $self->with_umask(sub { if ($writable == 1) { require File::Path; @@ -349,7 +350,7 @@ sub rlog { my $h40 = $hex .'{40}'; my $addmsg = qr!^:000000 100644 \S+ ($h40) A\t${hex}{2}/${hex}{38}$!; my $delmsg = qr!^:100644 000000 ($h40) \S+ D\t${hex}{2}/${hex}{38}$!; - my $git = PublicInbox::Git->new($self->{git_dir}); + my $git = $self->{git}; my $log = $git->popen(qw/log --reverse --no-notes --no-color --raw -r --no-abbrev/, $range); my $latest; |