diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-10-26 12:26:44 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-27 02:12:56 -0700 |
commit | d6b7e0b98f8d0f84e3b2614b33b52402fefb5735 (patch) | |
tree | da505bedf4c467d3d077a909b593ce9cf9c3bd9f | |
parent | f8a5da6d94baa0a90e7b383932911661bb551e1c (diff) | |
download | git-d6b7e0b98f8d0f84e3b2614b33b52402fefb5735.tar.gz git-d6b7e0b98f8d0f84e3b2614b33b52402fefb5735.tar.xz |
gitweb: Check git base URLs before generating URL from it
Check if each of git base URLs in @git_base_url_list is true before
appending "/$project" to it to generate project URL.
This fixes the error that for default configuration for gitweb in
Makefile, with GITWEB_BASE_URL empty (and "++GITWEB_BASE_URL++" being
"" in gitweb.cgi), we had URL of "/$project" in the summary view.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 2390603e9..05e7b1253 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -69,7 +69,7 @@ our $strict_export = "++GITWEB_STRICT_EXPORT++"; # 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'; |