about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoGitCommit.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-02-22 03:01:24 +0000
committerEric Wong <e@80x24.org>2017-02-22 03:01:24 +0000
commit6158b3e3476cd49a2e6c32fad88a7905ec88de8f (patch)
tree04eaf4f795bb393167cb8c32d37963c3e1e5c4b4 /lib/PublicInbox/RepoGitCommit.pm
parenta49c12485985cce469c8b653ff7b76c85343b08d (diff)
downloadpublic-inbox-6158b3e3476cd49a2e6c32fad88a7905ec88de8f.tar.gz
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")
Diffstat (limited to 'lib/PublicInbox/RepoGitCommit.pm')
-rw-r--r--lib/PublicInbox/RepoGitCommit.pm4
1 files changed, 2 insertions, 2 deletions
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;