summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Muchembled <jm@jmuchemb.eu>2011-10-21 19:04:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-21 21:46:38 (GMT)
commit53c632faab0be2e8510a678a4b7dfa01dc7f41e1 (patch)
treebb87fa27d832b263f1237e717115ce69a407af69
parent12b1443c2cf41174311c81667022c6f3149aa542 (diff)
downloadgit-53c632faab0be2e8510a678a4b7dfa01dc7f41e1.zip
git-53c632faab0be2e8510a678a4b7dfa01dc7f41e1.tar.gz
git-53c632faab0be2e8510a678a4b7dfa01dc7f41e1.tar.bz2
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>
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 014b33b..10cae72 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2741,7 +2741,7 @@ sub filter_forks_from_projects_list {
$path =~ s/\.git$//; # forks of 'repo.git' are in 'repo/' directory
next if ($path =~ m!/$!); # skip non-bare repositories, e.g. 'repo/.git'
next unless ($path); # skip '.git' repository: tests, git-instaweb
- next unless (-d $path); # containing directory exists
+ next unless (-d "$projectroot/$path"); # containing directory exists
$pr->{'forks'} = []; # there can be 0 or more forks of project
# add to trie