]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: fix display of trees via PATH_INFO.
authorMartin Waitz <redacted>
Thu, 21 Sep 2006 07:48:21 +0000 (09:48 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
When adding a / to the URL, git should display the corresponding
tree object, but it has to remove the / first.

Signed-off-by: Martin Waitz <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index adfb99f87125399cb6c0f449d19d6f77948b72a7918f0edc175da5e618e14d85..0cf22fa88bcb55fc7d7d2baf29b85851f3cd5aa6e9f41074c0e97e4bc43148cb 100755 (executable)
@@ -300,6 +300,7 @@ sub evaluate_path_info {
                $pathname =~ s,^/+,,;
                if (!$pathname || substr($pathname, -1) eq "/") {
                        $action  ||= "tree";
+                       $pathname =~ s,/$,,;
                } else {
                        $action  ||= "blob_plain";
                }
This page took 0.189276 seconds and 4 git commands to generate.