]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwCoderepo.pm
www_coderepo: tree: do not break #n$LINENO
[public-inbox.git] / lib / PublicInbox / WwwCoderepo.pm
index 668b639881a06a9be1a9fcb253e0dc1a03944496..f9c150c0604a6f6c1b8146b503c9715b5b16c85a 100644 (file)
@@ -223,9 +223,9 @@ sub srv { # endpoint called by PublicInbox::WWW
        }
        $path_info =~ m!\A/(.+?)/\z! and
                ($ctx->{git} = $cr->{$1}) and return summary($self, $ctx);
-       $path_info =~ m!\A/(.+?)/([a-f0-9]+)/s/\z! and
+       $path_info =~ m!\A/(.+?)/([a-f0-9]+)/s/([^/]+)?\z! and
                        ($ctx->{git} = $cr->{$1}) and
-               return PublicInbox::ViewVCS::show($ctx, $2);
+               return PublicInbox::ViewVCS::show($ctx, $2, $3);
 
        if ($path_info =~ m!\A/(.+?)/tree/(.*)\z! and
                        ($ctx->{git} = $cr->{$1})) {