Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-02 23:44:16 +0300
committerJunio C Hamano <gitster@pobox.com>2010-03-02 23:44:16 +0300
commita75bab51aef5284058afdd04b51923d03dfce5b2 (patch)
treeb8143e9671b9a3f367403b6acdd88d37f3da6900 /gitweb/gitweb.perl
parent52ebb06f1466a235c643acffdea9c9e484cfdec0 (diff)
parent9be3614eff36271d5f1cd460a568a219902cb044 (diff)
Merge branch 'maint'
* maint: gitweb: Fix project-specific feature override behavior gitweb multiple project roots documentation
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 8 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 32b04a469e..a2d2283ec9 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -454,7 +454,11 @@ sub gitweb_get_feature {
$feature{$name}{'sub'},
$feature{$name}{'override'},
@{$feature{$name}{'default'}});
- if (!$override) { return @defaults; }
+ # project specific override is possible only if we have project
+ our $git_dir; # global variable, declared later
+ if (!$override || !defined $git_dir) {
+ return @defaults;
+ }
if (!defined $sub) {
warn "feature $name is not overridable";
return @defaults;
@@ -2212,6 +2216,9 @@ sub config_to_multi {
sub git_get_project_config {
my ($key, $type) = @_;
+ # do we have project
+ return unless (defined $project && defined $git_dir);
+
# key sanity check
return unless ($key);
$key =~ s/^gitweb\.//;