diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-17 19:31:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-17 19:31:18 -0800 |
commit | a8f6b201aadcadeb9bfe05a66de32878bff800f7 (patch) | |
tree | ba35e286f47a53af3b08bbb1d5546b461b4fb8f4 /gitweb | |
parent | gitweb: Add new option -nohtml to quot_xxx subroutines (diff) | |
parent | gitweb: Use the config file to set repository owner's name. (diff) | |
download | tgif-a8f6b201aadcadeb9bfe05a66de32878bff800f7.tar.xz |
Merge branch 'br/gitweb'
* br/gitweb:
gitweb: Use the config file to set repository owner's name.
Diffstat (limited to 'gitweb')
-rw-r--r-- | gitweb/README | 4 | ||||
-rwxr-xr-x | gitweb/gitweb.perl | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gitweb/README b/gitweb/README index 4c8bedf744..2163071047 100644 --- a/gitweb/README +++ b/gitweb/README @@ -233,6 +233,10 @@ You can use the following files in repository: Displayed in the project summary page. You can use multiple-valued gitweb.url repository configuration variable for that, but the file takes precendence. + * gitweb.owner + You can use the gitweb.owner repository configuration variable to set + repository's owner. It is displayed in the project list and summary + page. If it's not set, filesystem directory's owner is used. * various gitweb.* config variables (in config) Read description of %feature hash for detailed list, and some descriptions. diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 8779ca8174..8008260f6b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1770,6 +1770,7 @@ sub git_get_project_owner { my $owner; return undef unless $project; + $git_dir = "$projectroot/$project"; if (!defined $gitweb_project_owner) { git_get_project_list_from_file(); @@ -1778,8 +1779,11 @@ sub git_get_project_owner { if (exists $gitweb_project_owner->{$project}) { $owner = $gitweb_project_owner->{$project}; } + if (!defined $owner){ + $owner = git_get_project_config('owner'); + } if (!defined $owner) { - $owner = get_file_owner("$projectroot/$project"); + $owner = get_file_owner("$git_dir"); } return $owner; |