summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aed93de)
raw | patch | inline | side by side (parent: aed93de)
author | Petr Baudis <pasky@suse.cz> | |
Thu, 2 Oct 2008 15:17:01 +0000 (17:17 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 3 Oct 2008 14:29:56 +0000 (07:29 -0700) |
This requires us to build a full index including forks and then weed
them out only when printing.
Signed-off-by: Petr Baudis <petr.baudis@novartis.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
them out only when printing.
Signed-off-by: Petr Baudis <petr.baudis@novartis.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0cb29705b2e8b343b162554ceef094741400fe56..99fdb13f1f8c02696a0e1ed46ec8581c7d27af97 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
my $subdir = substr($File::Find::name, $pfxlen + 1);
# we check related file in $projectroot
- if ($check_forks and $subdir =~ m#/.#) {
- $File::Find::prune = 1;
- } elsif (check_export_ok("$projectroot/$filter/$subdir")) {
+ if (check_export_ok("$projectroot/$filter/$subdir")) {
push @list, { path => ($filter ? "$filter/" : '') . $subdir };
$File::Find::prune = 1;
}
}
sub git_project_list_body {
+ # actually uses global variable $project
my ($projlist, $order, $from, $to, $extra, $no_header) = @_;
my ($check_forks) = gitweb_check_feature('forks');
my $tagfilter = $cgi->param('by_tag');
for (my $i = $from; $i <= $to; $i++) {
my $pr = $projects[$i];
+
next if $tagfilter and $show_ctags and not grep { lc $_ eq lc $tagfilter } keys %{$pr->{'ctags'}};
+ # Weed out forks
+ if ($check_forks) {
+ my $forkbase = $project; $forkbase ||= ''; $forkbase =~ s#\.git$#/#;
+ $forkbase="^$forkbase" if $forkbase;
+ next if not $tagfilter and $pr->{'path'} =~ m#$forkbase.*/.*#; # regexp-safe
+ }
+
if ($alternate) {
print "<tr class=\"dark\">\n";
} else {