Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-11

Re: [PATCH] gitweb: Check git base URLs before generating URL from it

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:51:41
Subsystem: the rest · Maintainer: Linus Torvalds

Wouldn't this be simpler and more to the point, I wonder?
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5a81b8f..aceaeb7 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -80,7 +80,7 @@ our $strict_export = "++GITWEB_STRICT_EX
 
 # list of git base URLs used for URL to where fetch project from,
 # i.e. full URL is "$git_base_url/$project"
-our @git_base_url_list = ("++GITWEB_BASE_URL++");
+our @git_base_url_list = grep { $_ ne '' } ("++GITWEB_BASE_URL++");
 
 # default blob_plain mimetype and default charset for text/plain blob
 our $default_blob_plain_mimetype = 'text/plain';
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help