Skip to content

Commit

Permalink
gitweb: Strip trailing slashes from $path in git_get_hash_by_path
Browse files Browse the repository at this point in the history
It also removes unused local variable $tree

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Sep 27, 2006
1 parent 6591039 commit 4b02f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 4b02f48

Please sign in to comment.