Subject: [PATCH 1/5] gitweb: Strip trailing slashes from $path in git_get_hash_by_path

From: Jakub Narebski <[email-masked]>
Date: Tue, 26 Sep 2006 01:54:24 +0200

It also removes unused local variable $tree 

Signed-off-by: Jakub Narebski <[email-masked]>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 66be619..2ad7eed 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -710,7 +710,7 @@ sub git_get_hash_by_path {
 	my $path = shift || return undef;
 	my $type = shift;
 
-	my $tree = $base;
+	$path =~ s,/+$,,;
 
 	open my $fd, "-|", git_cmd(), "ls-tree", $base, "--", $path
 		or die_error(undef, "Open git-ls-tree failed");
-- 
1.4.2.1