@matheusbsbs / matheus-bagliano / commits / 4b02f48372
Fork 0

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>

Jakub Narebski committed Sep 26, 2006 at 01:54 UTC 4b02f48372c72b38d2be7484355222f987f3af97
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -710,7 +710,7 @@ sub git_get_hash_by_path {
710 my $path = shift || return undef;
711 my $type = shift;
712
713 - my $tree = $base;
713 + $path =~ s,/+$,,;
714
715 open my $fd, "-|", git_cmd(), "ls-tree", $base, "--", $path
716 or die_error(undef, "Open git-ls-tree failed");