Skip to content

Commit

Permalink
gitweb: git_get_project_config requires only $git_dir, not also $project
Browse files Browse the repository at this point in the history
Fix overeager early return in git_get_project_config, introduced in 9be3614
(gitweb: Fix project-specific feature override behavior, 2010-03-01).  When
git_get_project_config is called from projects list page via
git_get_project_owner($path) etc., it is called with $git_dir defined (in
git_get_project_owner($path) etc.), but $project variable is not defined.
git_get_project_config doesn't use $project variable anyway.

Reported-by: Tobias Heinlein <keytoaster@gentoo.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Mar 31, 2010
1 parent e476286 commit 7a49c25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2209,8 +2209,7 @@ sub config_to_multi {
sub git_get_project_config {
my ($key, $type) = @_;

# do we have project
return unless (defined $project && defined $git_dir);
return unless defined $git_dir;

# key sanity check
return unless ($key);
Expand Down

0 comments on commit 7a49c25

Please sign in to comment.