Skip to content

Commit

Permalink
gitweb: Check git base URLs before generating URL from it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Oct 27, 2006
1 parent f8a5da6 commit d6b7e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

# 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';
Expand Down

0 comments on commit d6b7e0b

Please sign in to comment.