]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Strip trailing slashes from $path in git_get_hash_by_path
[Gitweb] / gitweb.perl
index 932f15eb459a08b4730f27c89ac650bd07c48baa71444e4bfb92d7e424376631..d6f9bae033342a9a4e06ece913480768b19f00a31bb8c280fe709aeeffbb9206 100755 (executable)
@@ -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");
This page took 0.148236 seconds and 4 git commands to generate.