diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-09-26 01:54:24 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-09-27 00:41:35 -0700 |
commit | 4b02f48372c72b38d2be7484355222f987f3af97 (patch) | |
tree | 3b9f90e738ac4926887b563fb596f66465e0b89c | |
parent | 65910395c08e3dc4be685a9a9f60adfa61c89aa5 (diff) | |
download | git-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-x | gitweb/gitweb.perl | 2 |
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"); |