* [PATCH] gitweb: fix regression when filtering out forks
@ 2011-10-21 19:04 Julien Muchembled
2011-10-21 20:51 ` Jakub Narebski
0 siblings, 1 reply; 2+ messages in thread
From: Julien Muchembled @ 2011-10-21 19:04 UTC (permalink / raw)
To: git, Jakub Narebski; +Cc: Julien Muchembled
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gitweb: fix regression when filtering out forks
2011-10-21 19:04 [PATCH] gitweb: fix regression when filtering out forks Julien Muchembled
@ 2011-10-21 20:51 ` Jakub Narebski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2011-10-21 20:51 UTC (permalink / raw)
To: Julien Muchembled; +Cc: git
On Fri, 21 Oct 2011, Julien Muchembled wrote:
> 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>
Thanks.
I am embarrassed that I missed this; in the test I have added $projectroot
_is_ current directory for script. Anyway I have tested this in running
local installation on testsuite, and it now works (i.e. hide forks under
"+" character, where it would not before - gitweb shown every project).
Tested-by: Jakub Narebski <jnareb@gmail.com>
> ---
> 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
> --
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-21 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-21 19:04 [PATCH] gitweb: fix regression when filtering out forks Julien Muchembled
2011-10-21 20:51 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).