gitweb: Make config_to_multi return [] instead of [undef]

This is important for the list of clone urls, where if there are
no per-repository clone URL configured, the default base URLs
are never used for URL construction without this patch.

Add tests for different ways of setting project URLs, just in case.
Note that those tests in current form wouldn't detect breakage fixed
by this patch, as it only checks for errors and not for expected
output.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Petr Baudis
2007-12-08 12:30:59 +01:00
committed by Junio C Hamano
parent dfa7c7d221
commit bc8b95ae4a
2 changed files with 26 additions and 1 deletions

View File

@ -1511,7 +1511,7 @@ sub config_to_int {
sub config_to_multi {
my $val = shift;
return ref($val) ? $val : [ $val ];
return ref($val) ? $val : (defined($val) ? [ $val ] : []);
}
sub git_get_project_config {