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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2007, 08:29 UTC
Message-ID
<7vlk84s23i.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<m38x45tb9y.fsf@roke.D-201>
Jakub Narebski <jnareb@gmail.com> writes:
Show 19 quoted lines
> Petr Baudis <pasky@suse.cz> 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?
Previous: Jakub Narebski
Message 3 of 3 in “gitweb: Make config_to_multi return [] instead of [undef]”
  1. gitweb: Make config_to_multi return [] instead of [undef]Petr Baudis, Dec 8, 2007
  2. Jakub NarebskiDec 8, 2007
  3. Junio C HamanoDec 9, 2007

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.