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

[PATCH] gitweb: Don't set owner if got empty value from projects.list

From
Kacper Kornet <draenog@pld-linux.org>
Date
Apr 24, 2012, 17:50 UTC
Message-ID
<20120424175005.GD15600@camk.edu.pl>

Prevent setting owner to an empty value if it is not specified in projects.list file. Otherwise it stops retrieving information about the owner from other files.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
---
The change is necessary due to 14b289bdf7c31176dc525cbe81173ec636598782:
"gitweb: Refactor checking if part of project info need filling", which
replaced !defined with !exists in check if owner is set.  
 gitweb/gitweb.perl |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3aeeb8b..adb0caa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2906,9 +2906,11 @@ sub git_get_projects_list {
 			}
 			if (check_export_ok("$projectroot/$path")) {
 				my $pr = {
-					path => $path,
-					owner => to_utf8($owner),
+					path => $path
 				};
+				if ($owner) {
+					$pr->{'owner'} = to_utf8($owner);
+				}
 				push @list, $pr;
 			}
 		}
-- 
1.7.10

-- 
  Kacper Kornet
Message 1 of 1 in “gitweb: Don't set owner if got empty value from projects.list”
  1. gitweb: Don't set owner if got empty value from projects.listKacper Kornet, Apr 24, 2012

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.