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/RepoGitTag.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/RepoGitTag.pm') diff --git a/lib/PublicInbox/RepoGitTag.pm b/lib/PublicInbox/RepoGitTag.pm index 96835b2c..d046f853 100644 --- a/lib/PublicInbox/RepoGitTag.pm +++ b/lib/PublicInbox/RepoGitTag.pm @@ -19,9 +19,8 @@ my %cmd_map = ( # type => action sub call_git_tag { my ($self, $req) = @_; - my $q = PublicInbox::RepoGitQuery->new($req->{env}); - my $h = $q->{h}; - $h eq '' and return git_tag_list($self, $req); + my $h = $req->{h}; + defined $h or return git_tag_list($self, $req); sub { my ($res) = @_; git_tag_show($self, $req, $h, $res); @@ -58,7 +57,7 @@ sub git_show_tag_as_tag { my $label = "$type $obj"; my $cmd = $cmd_map{$type} || 'show'; my $rel = $req->{relcmd}; - my $obj_link = qq($label); + my $obj_link = qq($label); $head = $h . "\n\n tag $tag\nobject $obj_link\n"; if (my $tagger = $h{tagger}) { $head .= 'tagger ' . join("\t", creator_split($tagger)) . "\n"; @@ -147,7 +146,7 @@ sub git_each_tag_sed ($$) { my $h = $ref->as_html; $ref = $ref->as_href; $dst .= qq() . - qq($h) . + qq($h) . qq($date) . utf8_html($s) . ''; } @@ -189,7 +188,7 @@ sub unknown_tag_type { my $rel = $req->{relcmd}; my $label = "$type $hex"; my $cmd = $cmd_map{$type} || 'show'; - my $obj_link = qq($label\n); + my $obj_link = qq($label\n); $fh->write($self->html_start($req, "$repo_info->{repo}: ref: $h") . -- cgit v1.2.3-24-ge0c7