All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Julien Muchembled <jm@jmuchemb.eu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] gitweb: fix regression when filtering out forks
Date: Fri, 21 Oct 2011 22:51:18 +0200	[thread overview]
Message-ID: <201110212251.18810.jnareb@gmail.com> (raw)
In-Reply-To: <1319223861-10803-1-git-send-email-jm@jmuchemb.eu>

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

      reply	other threads:[~2011-10-21 20:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 19:04 [PATCH] gitweb: fix regression when filtering out forks Julien Muchembled
2011-10-21 20:51 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201110212251.18810.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jm@jmuchemb.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.