Skip to content

Commit

Permalink
Merge branch 'br/gitweb'
Browse files Browse the repository at this point in the history
* br/gitweb:
  gitweb: Use the config file to set repository owner's name.
  • Loading branch information
Junio C Hamano committed Feb 18, 2008
2 parents c84c483 + b59012e commit a8f6b20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gitweb/README
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand Down

0 comments on commit a8f6b20

Please sign in to comment.