From 6158b3e3476cd49a2e6c32fad88a7905ec88de8f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 22 Feb 2017 03:01:24 +0000 Subject: repobrowse: fixup revision handling Revisions passed in the URL must not be ignored. This fixes some bugs introduced in commit f6244586ba4f5a5e7575e1254be8c9bbe303fce9 ("repobrowse: switch to new URL format to avoid query strings") --- lib/PublicInbox/RepoGitCommit.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/RepoGitCommit.pm') diff --git a/lib/PublicInbox/RepoGitCommit.pm b/lib/PublicInbox/RepoGitCommit.pm index 22a2742c..34f7acc3 100644 --- a/lib/PublicInbox/RepoGitCommit.pm +++ b/lib/PublicInbox/RepoGitCommit.pm @@ -124,11 +124,11 @@ sub call_git_commit { # RepoBase calls this my $relup = join('', map { '../' } @{$req->{extra}}); return $self->r(301, $req, "$relup#".to_attr($expath)); } - + my $tip = $req->{tip} || $req->{-repo}->tip; my $git = $req->{-repo}->{git}; my $cmd = $git->cmd(qw(show -z --numstat -p --encoding=UTF-8 --no-notes --no-color -c --no-abbrev), - GIT_FMT, $req->{-repo}->tip, '--'); + GIT_FMT, $tip, '--'); my $rdr = { 2 => $git->err_begin }; my $qsp = PublicInbox::Qspawn->new($cmd, undef, $rdr); $env->{'qspawn.quiet'} = 1; -- cgit v1.2.3-24-ge0c7