From: Jakub Narebski Date: Mon, 25 Sep 2006 23:54:24 +0000 (+0200) Subject: gitweb: Strip trailing slashes from $path in git_get_hash_by_path X-Git-Tag: v1.4.3-rc1~4^2~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4b02f48372c72b38d2be7484355222f987f3af97;p=git.git gitweb: Strip trailing slashes from $path in git_get_hash_by_path It also removes unused local variable $tree Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- 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");