2 # Copyright (C) 2016-2021 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
6 use PublicInbox::GitHTTPBackend;
9 use BSD::Resource qw(getrusage);
10 my $git_dir = $ENV{GIANT_GIT_DIR} or die 'GIANT_GIT_DIR not defined in env';
11 my $git = PublicInbox::Git->new($git_dir);
16 if ($env->{PATH_INFO} =~ m!\A/(.+)\z!s) {
17 PublicInbox::GitHTTPBackend::serve($env, $git, $1);
20 my $b = $ru->maxrss . "\n";
21 [ 200, [ qw(Content-Type text/plain Content-Length),
22 length($b) ], [ $b ] ]