gitweb: Don't set owner if got empty value from projects.list
authorKacper Kornet <draenog@pld-linux.org>
Tue, 24 Apr 2012 17:50:05 +0000 (19:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Apr 2012 23:41:37 +0000 (16:41 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl

index a8b5fad26631207fcc17a6339ba735877c0902bd..f9ec0de668ba75f58b8e55d4b5b0760c5cfd3a1d 100755 (executable)
@@ -2997,9 +2997,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;
                        }
                }