summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: baf0bfc)
raw | patch | inline | side by side (parent: baf0bfc)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 8 Nov 2006 06:00:45 +0000 (22:00 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 8 Nov 2006 06:00:45 +0000 (22:00 -0800) |
Apparently this code was never tested without "forks". check-feature
returns a one-element list (0) when disabled, and assigning that to a
scalar variable made it to be called in a scalar context, which meant
my $check_forks = gitweb_check_feature("forks") were always 1!
Signed-off-by: Junio C Hamano <junkio@cox.net>
returns a one-element list (0) when disabled, and assigning that to a
scalar variable made it to be called in a scalar context, which meant
my $check_forks = gitweb_check_feature("forks") were always 1!
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3c6fd7ca47551eb808a40ca2cc7ed1690f19cc06..680832c986aa30f796466dd66f673ddd7ecfa553 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
$dir =~ s!/+$!!;
my $pfxlen = length("$dir");
- my $check_forks = gitweb_check_feature('forks');
+ my ($check_forks) = gitweb_check_feature('forks');
File::Find::find({
follow_fast => 1, # follow symbolic links
sub git_project_list_body {
my ($projlist, $order, $from, $to, $extra, $no_header) = @_;
- my $check_forks = gitweb_check_feature('forks');
+ my ($check_forks) = gitweb_check_feature('forks');
my @projects;
foreach my $pr (@$projlist) {
my @taglist = git_get_tags_list(15);
my @headlist = git_get_heads_list(15);
my @forklist;
- if (gitweb_check_feature('forks')) {
+ my ($check_forks) = gitweb_check_feature('forks');
+
+ if ($check_forks) {
@forklist = git_get_projects_list($project);
}