]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: fix regression when filtering out forks
authorJulien Muchembled <redacted>
Fri, 21 Oct 2011 19:04:21 +0000 (21:04 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
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 <redacted>
Tested-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 944898b1c91b08eb65c4d588b0c0933c059f1ebe6a9708a71ecb284a264c90ec..09a995158daf0778440a60af697ebe6e2d1d64094a81411cdc75e2ec70d685af 100755 (executable)
@@ -2889,7 +2889,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
This page took 0.300461 seconds and 4 git commands to generate.