Skip to content

Commit a8f6b20

Browse files
committed
Merge branch 'br/gitweb'
* br/gitweb: gitweb: Use the config file to set repository owner's name.
2 parents c84c483 + b59012e commit a8f6b20

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

gitweb/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ You can use the following files in repository:
233233
Displayed in the project summary page. You can use multiple-valued
234234
gitweb.url repository configuration variable for that, but the file
235235
takes precendence.
236+
* gitweb.owner
237+
You can use the gitweb.owner repository configuration variable to set
238+
repository's owner. It is displayed in the project list and summary
239+
page. If it's not set, filesystem directory's owner is used.
236240
* various gitweb.* config variables (in config)
237241
Read description of %feature hash for detailed list, and some
238242
descriptions.

gitweb/gitweb.perl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,7 @@ sub git_get_project_owner {
17701770
my $owner;
17711771

17721772
return undef unless $project;
1773+
$git_dir = "$projectroot/$project";
17731774

17741775
if (!defined $gitweb_project_owner) {
17751776
git_get_project_list_from_file();
@@ -1778,8 +1779,11 @@ sub git_get_project_owner {
17781779
if (exists $gitweb_project_owner->{$project}) {
17791780
$owner = $gitweb_project_owner->{$project};
17801781
}
1782+
if (!defined $owner){
1783+
$owner = git_get_project_config('owner');
1784+
}
17811785
if (!defined $owner) {
1782-
$owner = get_file_owner("$projectroot/$project");
1786+
$owner = get_file_owner("$git_dir");
17831787
}
17841788

17851789
return $owner;

0 commit comments

Comments
 (0)