aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-09-26 01:54:24 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-27 00:41:35 -0700
commit4b02f48372c72b38d2be7484355222f987f3af97 (patch)
tree3b9f90e738ac4926887b563fb596f66465e0b89c
parent65910395c08e3dc4be685a9a9f60adfa61c89aa5 (diff)
downloadgit-4b02f48372c72b38d2be7484355222f987f3af97.tar.gz
git-4b02f48372c72b38d2be7484355222f987f3af97.tar.xz
gitweb: Strip trailing slashes from $path in git_get_hash_by_path
It also removes unused local variable $tree Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e769c8ed6..4686d9376 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");