gitweb: fix regression when filtering out forks

This fixes a condition in filter_forks_from_projects_list that failed if process directory was different from project root: in such case, the subroutine was a no-op and forks were not detected. Signed-off-by: Julien Muchembled <jm@jmuchemb.eu> Tested-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Julien Muchembled committed Oct 21, 2011 at 21:04 UTC 53c632faab0be2e8510a678a4b7dfa01dc7f41e1
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -2741,7 +2741,7 @@ sub filter_forks_from_projects_list {
2741 $path =~ s/\.git$//; # forks of 'repo.git' are in 'repo/' directory
2742 next if ($path =~ m!/$!); # skip non-bare repositories, e.g. 'repo/.git'
2743 next unless ($path); # skip '.git' repository: tests, git-instaweb
2744 - next unless (-d $path); # containing directory exists
2744 + next unless (-d "$projectroot/$path"); # containing directory exists
2745 $pr->{'forks'} = []; # there can be 0 or more forks of project
2746
2747 # add to trie