From: Junio C Hamano Date: Sun, 09 Dec 2007 08:29:21 GMT Subject: Re: [PATCH] gitweb: Make config_to_multi return [] instead of [undef] Message-ID: <7vlk84s23i.fsf@gitster.siamese.dyndns.org> In-Reply-To: Jakub Narebski writes: > Petr Baudis writes: > >> 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 with this patch. > > Thanks. > >> @@ -1512,7 +1512,7 @@ sub config_to_int { >> sub config_to_multi { >> my $val = shift; >> >> - return ref($val) ? $val : [ $val ]; >> + return ref($val) ? $val : $val ? [ $val ] : []; >> } > > Shouldn't it be > > + return ref($val) ? $val : defined($val) ? [ $val ] : []; I think so. Pasky?