summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 053d9e4)
raw | patch | inline | side by side (parent: 053d9e4)
author | Bruno Ribas <ribas@c3sl.ufpr.br> | |
Fri, 8 Feb 2008 16:38:04 +0000 (14:38 -0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 10 Feb 2008 07:37:03 +0000 (23:37 -0800) |
Now gitweb checks if gitweb.owner exists before trying to get filesystem's
owner.
Allow to use configuration variable gitweb.owner set the repository owner,
it checks the gitweb.owner, if not set it uses filesystem directory's owner.
Useful when we don't want to maintain project list file, and all
repository directories have to have the same owner (for example when the
same SSH account is shared for all projects, using ssh_acl to control
access instead).
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
owner.
Allow to use configuration variable gitweb.owner set the repository owner,
it checks the gitweb.owner, if not set it uses filesystem directory's owner.
Useful when we don't want to maintain project list file, and all
repository directories have to have the same owner (for example when the
same SSH account is shared for all projects, using ssh_acl to control
access instead).
Signed-off-by: Bruno Ribas <ribas@c3sl.ufpr.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/README | patch | blob | history | |
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/README b/gitweb/README
index 4c8bedf7449266229e8102efac249e68fd9d8b39..2163071047a0f4a7620eebf2f4e18008f592c049 100644 (file)
--- a/gitweb/README
+++ b/gitweb/README
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 8ef2735c5857dd314318cae8839426543c34f8ee..c8fe22a961f8b4618d56c32546cd14f3df8ea24b 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
my $owner;
return undef unless $project;
+ $git_dir = "$projectroot/$project";
if (!defined $gitweb_project_owner) {
git_get_project_list_from_file();
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;