From 4c2c2325d2948ec5340e2fcafbee798cf568f5fd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Dec 2015 00:17:33 +0000 Subject: rename 'GitCatFile' package to 'Git' We'll be using it for more than just cat-file. Adding a `popen' API for internal use allows us to save a bunch of code in other places. --- lib/PublicInbox/Mbox.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Mbox.pm') diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index c180a0dc..0d67981f 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -86,9 +86,9 @@ sub emit_mbox { my $fh = $response->([200, ['Content-Type' => "application/$type"]]); $fh = PublicInbox::MboxGz->new($fh) if $sfx; - require PublicInbox::GitCatFile; + require PublicInbox::Git; my $mid = $ctx->{mid}; - my $git = PublicInbox::GitCatFile->new($ctx->{git_dir}); + my $git = $ctx->{git} ||= PublicInbox::Git->new($ctx->{git_dir}); my %opts = (offset => 0); my $nr; do { -- cgit v1.2.3-24-ge0c7