about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoGitDiffCommon.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/RepoGitDiffCommon.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/RepoGitDiffCommon.pm')
-rw-r--r--lib/PublicInbox/RepoGitDiffCommon.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/RepoGitDiffCommon.pm b/lib/PublicInbox/RepoGitDiffCommon.pm
index 46e243ed..b60a5fbc 100644
--- a/lib/PublicInbox/RepoGitDiffCommon.pm
+++ b/lib/PublicInbox/RepoGitDiffCommon.pm
@@ -68,7 +68,7 @@ sub git_diff_ab_hunk ($$$$) {
                 $na = defined $na ? "#n$na" : '';
                 my $p = $req->{p}->[0];
                 $rv .= qq(<a\nrel=nofollow);
-                $rv .= qq(\nhref="${rel}tree/$p/$req->{path_a}$na">);
+                $rv .= qq(\nhref="${rel}src/$p/$req->{path_a}$na">);
                 $rv .= "$ca</a>";
         }
         $rv .= ' ';
@@ -77,7 +77,7 @@ sub git_diff_ab_hunk ($$$$) {
         } else {
                 $nb = defined $nb ? "#n$nb" : '';
                 $rv .= qq(<a\nrel=nofollow);
-                $rv .= qq(\nhref="${rel}tree/$req->{-tip}/$req->{path_b}$nb">);
+                $rv .= qq(\nhref="${rel}src/$req->{-tip}/$req->{path_b}$nb">);
                 $rv .= "$cb</a>";
         }
         $rv . ' @@' . utf8_html($ctx);
@@ -121,14 +121,14 @@ sub git_diff_cc_hunk {
                 }
         }
 
-        # we can use the normal 'tree' endpoint for the result
+        # we can use the normal 'src' endpoint for the result
         my ($n) = ($last =~ /\A\+(\d+)/); # line number
         if ($n == 0) { # deleted file (does this happen with --cc?)
                 $rv .= " $last";
         } else {
                 my $H = $req->{H};
                 $rv .= qq( <a\nrel=nofollow);
-                $rv .= qq(\nhref="${rel}tree/$H/$path#n$n">$last</a>);
+                $rv .= qq(\nhref="${rel}src/$H/$path#n$n">$last</a>);
         }
         $rv .= " $at" . utf8_html($ctx);
 }