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:
parent
65910395c0
commit
4b02f48372
@ -710,7 +710,7 @@ sub git_get_hash_by_path {
|
|||||||
my $path = shift || return undef;
|
my $path = shift || return undef;
|
||||||
my $type = shift;
|
my $type = shift;
|
||||||
|
|
||||||
my $tree = $base;
|
$path =~ s,/+$,,;
|
||||||
|
|
||||||
open my $fd, "-|", git_cmd(), "ls-tree", $base, "--", $path
|
open my $fd, "-|", git_cmd(), "ls-tree", $base, "--", $path
|
||||||
or die_error(undef, "Open git-ls-tree failed");
|
or die_error(undef, "Open git-ls-tree failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user