Code

gitweb: fix display of trees via PATH_INFO.
authorMartin Waitz <tali@admingilde.org>
Thu, 21 Sep 2006 07:48:21 +0000 (09:48 +0200)
committerJunio C Hamano <junkio@cox.net>
Thu, 21 Sep 2006 08:15:23 +0000 (01:15 -0700)
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 <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index baadbe751275ccd0205af089d9ab4b245fa6a62c..ea5771737e77a06d90a1f07d61c0769c743e4dac 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";
                }