Skip to contentSkip to conversation

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

PATCH New Kacper Kornet 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

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.

---
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(-)
gitweb/gitweb.perl +4 -2
index 3aeeb8b..adb0caa 100755
@@ -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;
 			}
 		}
Signature · 4 lines
1.7.10

-- 
  Kacper Kornet