git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Use the config file to set repository owner's name.

From
BRBruno Ribas <ribas@c3sl.ufpr.br>
Date
Feb 8, 2008, 04:41 UTC
Message-ID
<1202445714-28971-2-git-send-email-ribas@c3sl.ufpr.br>
In-Reply-To
<1202445714-28971-1-git-send-email-ribas@c3sl.ufpr.br>
From: Git Managment for C3SL <git@git.c3sl.ufpr.br>

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: Git Managment for C3SL <git@git.c3sl.ufpr.br>
---
 gitweb/gitweb.perl |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8ef2735..e8a43b7 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1767,7 +1767,12 @@ sub git_get_project_owner {
 	if (exists $gitweb_project_owner->{$project}) {
 		$owner = $gitweb_project_owner->{$project};
 	}
-	if (!defined $owner) {
+
+	if (!defined $owner){
+		$owner = git_get_project_config('owner');
+	}
+
+	if (!$owner) {
 		$owner = get_file_owner("$projectroot/$project");
 	}
 
-- 
1.5.4.34.g053d9-dirty
Previous: Bruno RibasNext: Bruno Ribas
Message 2 of 12 in “Adding gitweb.owner, last shot”
  1. Bruno RibasFeb 8, 2008
  2. gitweb: Use the config file to set repository owner's name.Bruno Ribas, Feb 8, 2008
  3. gitweb: Update gitweb/README to include the new per-repository gitweb.ownerBruno Ribas, Feb 8, 2008
  4. Jakub NarebskiFeb 8, 2008
  5. Bruno Cesar RibasFeb 8, 2008
  6. Bruno Cesar RibasFeb 8, 2008
  7. Jakub NarebskiFeb 8, 2008
  8. Bruno Cesar RibasFeb 8, 2008
  9. Junio C HamanoFeb 8, 2008
  10. Bruno Cesar RibasFeb 8, 2008
  11. Jakub NarebskiFeb 8, 2008
  12. Bruno Cesar RibasFeb 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.