From f6244586ba4f5a5e7575e1254be8c9bbe303fce9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Feb 2017 22:35:18 +0000 Subject: repobrowse: switch to new URL format to avoid query strings Query strings make endpoint caching more difficult since they're order-independent. They are also more likely lost or truncated inadvertantly when copy+pasting, so try to avoid them for default endpoints. There's still some things which are broken and followup commits will be needed to fix them. --- lib/PublicInbox/RepoGitBlob.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/PublicInbox/RepoGitBlob.pm') diff --git a/lib/PublicInbox/RepoGitBlob.pm b/lib/PublicInbox/RepoGitBlob.pm index 586b4acc..f9c28c22 100644 --- a/lib/PublicInbox/RepoGitBlob.pm +++ b/lib/PublicInbox/RepoGitBlob.pm @@ -12,10 +12,7 @@ our @EXPORT = qw(git_blob_mime_type git_blob_stream_response); sub call_git_blob { my ($self, $req) = @_; my $git = $req->{repo_info}->{git}; - my $q = PublicInbox::RepoGitQuery->new($req->{env}); - my $id = $q->{id}; - $id eq '' and $id = 'HEAD'; - $id .= ":$req->{expath}"; + my $id = $req->{-tip} . ':' . $req->{expath}; my ($cat, $hex, $type, $size) = $git->cat_file_begin($id); return unless defined $cat; -- cgit v1.2.3-24-ge0c7