about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepobrowseGitPatch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitPatch.pm')
-rw-r--r--lib/PublicInbox/RepobrowseGitPatch.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseGitPatch.pm b/lib/PublicInbox/RepobrowseGitPatch.pm
index b8a44e51..eeffc5cb 100644
--- a/lib/PublicInbox/RepobrowseGitPatch.pm
+++ b/lib/PublicInbox/RepobrowseGitPatch.pm
@@ -15,7 +15,8 @@ my $sig = '--signature=git '.join(' ', @CMD);
 sub call_git_patch {
         my ($self, $req) = @_;
         my $git = $req->{repo_info}->{git};
-        my $q = PublicInbox::RepobrowseGitQuery->new($req->{cgi});
+        my $env = $req->{env};
+        my $q = PublicInbox::RepobrowseGitQuery->new($env);
         my $id = $q->{id};
         $id =~ /\A[\w-]+([~\^][~\^\d])*\z/ or $id = 'HEAD';
 
@@ -27,7 +28,6 @@ sub call_git_patch {
                 push @cmd, $expath;
         }
         my $rpipe = $git->popen(@cmd);
-        my $env = $req->{cgi}->env;
         my $err = $env->{'psgi.errors'};
         my ($n, $res, $vin, $fh);
         my $end = sub {