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>
This commit is contained in:
Jakub Narebski 2006-09-26 01:54:24 +02:00 committed by Junio C Hamano
parent 65910395c0
commit 4b02f48372

View File

@ -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");