summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Jakub Narebski <jnareb@gmail.com>2006-09-26 01:54:24 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2006-09-27 00:41:35 -0700
commit4b02f48372c72b38d2be7484355222f987f3af97 (patch)
tree3b9f90e738ac4926887b563fb596f66465e0b89c
parentgitweb: extend blame to show links to diff and previous (diff)
downloadtgif-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 e769c8ed6c..4686d9376d 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");