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

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

From
Junio C Hamano <junkio@cox.net>
Date
Oct 26, 2006, 17:21 UTC
Message-ID
<7vr6wvkn66.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200610261226.44960.jnareb@gmail.com>
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';
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “gitweb: Check git base URLs before generating URL from it”
  1. gitweb: Check git base URLs before generating URL from itJakub Narebski, Oct 26, 2006
  2. Junio C HamanoOct 26, 2006
  3. Jakub NarebskiOct 26, 2006

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.