about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoGitCommit.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-03-02 23:39:49 +0000
committerEric Wong <e@80x24.org>2017-03-02 23:39:49 +0000
commit16b1fbe36cc39a351ef9810b9018d36df833a941 (patch)
tree6a354e1ab5177993fb11bd5ae0e43400d66ffbce /lib/PublicInbox/RepoGitCommit.pm
parenta4df292ed39f6e02a7d57326f291583339cb562d (diff)
downloadpublic-inbox-16b1fbe36cc39a351ef9810b9018d36df833a941.tar.gz
This is shorter, and makes more sense as the endpoint
displays both tree listings and actual blob sources.
This will also make rewriting existing URLs from cgit
installations easier.
Diffstat (limited to 'lib/PublicInbox/RepoGitCommit.pm')
-rw-r--r--lib/PublicInbox/RepoGitCommit.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/RepoGitCommit.pm b/lib/PublicInbox/RepoGitCommit.pm
index 34f7acc3..8add3006 100644
--- a/lib/PublicInbox/RepoGitCommit.pm
+++ b/lib/PublicInbox/RepoGitCommit.pm
@@ -40,7 +40,7 @@ sub commit_header {
         my $rel = $req->{relcmd};
         my $x = $self->html_start($req, $s) . "\n" .
                 qq(   commit $H (<a\nhref="${rel}patch/$H">patch</a>)\n) .
-                qq(     tree <a\nrel=nofollow\nhref="${rel}tree/$H">$t</a>);
+                qq(     tree <a\nrel=nofollow\nhref="${rel}src/$H">$t</a>);
 
         my $git = $req->{-repo}->{git};
         # extra show path information, if any
@@ -55,7 +55,7 @@ sub commit_header {
                         my $e = PublicInbox::Hval->utf8($_, join('/', @t));
                         $ep = $e->as_path;
                         my $eh = $e->as_html;
-                        $ep = "${rel}tree/$ep/$H";
+                        $ep = "${rel}src/$ep/$H";
                         qq(<a\nrel=nofollow\nhref="$ep">$eh</a>);
                 } @$extra);
                 $path = "/$ep";
@@ -185,7 +185,7 @@ sub show_unchanged {
                 $p = $p->as_path;
                 $fn = utf8_html($fn);
                 $$dst .= qq(\t<a\nrel=nofollow);
-                $$dst .= qq(\nid="$anchor"\nhref="${rel}tree/$p">);
+                $$dst .= qq(\nid="$anchor"\nhref="${rel}src/$p">);
                 $$dst .= "$fn</a>\n";
         }
 }