git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Prevent warning
@ 2018-10-29 15:39 Pete
  2018-10-29 15:54 ` Torsten Bögershausen
  2018-10-29 16:33 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: Pete @ 2018-10-29 15:39 UTC (permalink / raw)
  To: git

Prevent the following warning in the web server error log:
gitweb.cgi: Odd number of elements in anonymous hash at /usr/share/gitweb/gitweb.cgi line 3305
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2594a4badb3d7..200647b683225 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3302,7 +3302,7 @@ sub git_get_remotes_list {
 		next if $wanted and not $remote eq $wanted;
 		my ($url, $key) = ($1, $2);
 
-		$remotes{$remote} ||= { 'heads' => () };
+		$remotes{$remote} ||= { 'heads' => [] };
 		$remotes{$remote}{$key} = $url;
 	}
 	close $fd or return;

--
https://github.com/git/git/pull/548

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-29 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 15:39 [PATCH] Prevent warning Pete
2018-10-29 15:54 ` Torsten Bögershausen
2018-10-29 16:33 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).