Subject: [PATCH] gitweb: fix display of trees via PATH_INFO.

From: Martin Waitz <[email-masked]>
Date: Thu, 21 Sep 2006 09:48:21 +0200

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 <[email-masked]>
---
 gitweb/gitweb.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index baadbe7..ea57717 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -300,6 +300,7 @@ sub evaluate_path_info {
 		$pathname =~ s,^/+,,;
 		if (!$pathname || substr($pathname, -1) eq "/") {
 			$action  ||= "tree";
+			$pathname =~ s,/$,,;
 		} else {
 			$action  ||= "blob_plain";
 		}
-- 
1.4.2.gb8b6b

-- 
Martin Waitz