]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: tree view omits plain and log links
authorEric Wong <e@80x24.org>
Sun, 3 Jan 2016 11:22:54 +0000 (11:22 +0000)
committerEric Wong <e@80x24.org>
Tue, 5 Apr 2016 18:58:27 +0000 (18:58 +0000)
No need to clutter up the page with more senseless links few
people will follow.  The blob view now has plain links for
people who want to save a single file, and will have log links
added, later.

lib/PublicInbox/RepoBrowseGitTree.pm

index 7cab58c982c9bb12f636bdde9da031cf88693537..d5c74e7e6a40d1430b8c9105c5995f09d67523ac 100644 (file)
@@ -145,10 +145,8 @@ sub git_tree_show {
                $pfx = 'tree/';
        }
 
-       my $plain_pfx = join('/', "$req->{relcmd}plain", @{$req->{extra}}, '');
-       $plain_pfx = PublicInbox::Hval->utf8($plain_pfx)->as_path;
        local $/ = "\0";
-       $fh->write("<b>mode\t\t\tsize\tname</b>\n");
+       $fh->write("<b>mode\tsize\tname</b>\n");
        while (defined(my $l = <$ls>)) {
                chomp $l;
                my ($m, $t, $x, $s, $path) =
@@ -168,9 +166,10 @@ sub git_tree_show {
                elsif ($m eq 'l') { $path = "<i>$path</i>" }
                $s =~ s/\s+//g;
 
-               $fh->write(qq($m\tlog ).
-                       qq(<a\nhref="$plain_pfx$ref$qs">plain</a>) .
-                       qq(\t$s\t<a\nhref="$pfx$ref$qs">$path</a>\n));
+               # 'plain' and 'log' links intentionally omitted for brevity
+               # and speed
+               $fh->write(qq($m\t).
+                       qq($s\t<a\nhref="$pfx$ref$qs">$path</a>\n));
        }
        $fh->write('</pre>');
 }