git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: fix regression when filtering out forks

From
JMJulien Muchembled <jm@jmuchemb.eu>
Date
Oct 21, 2011, 19:04 UTC
Message-ID
<1319223861-10803-1-git-send-email-jm@jmuchemb.eu>

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>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 70a576a..206e2a6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2875,7 +2875,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
-- 
1.7.7.731.g3af63.dirty
Next: Jakub Narebski
Message 1 of 2 in “gitweb: fix regression when filtering out forks”
  1. gitweb: fix regression when filtering out forksJulien Muchembled, Oct 21, 2011
  2. Jakub NarebskiOct 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.