diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-09-26 03:54:24 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-27 11:41:35 +0400 |
commit | 4b02f48372c72b38d2be7484355222f987f3af97 (patch) | |
tree | 3b9f90e738ac4926887b563fb596f66465e0b89c /gitweb | |
parent | 65910395c08e3dc4be685a9a9f60adfa61c89aa5 (diff) |
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
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"); |