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
Jakub Narebski <jnareb@gmail.com>
Date
Dec 8, 2007, 16:13 UTC
Message-ID
<m38x45tb9y.fsf@roke.D-201>
In-Reply-To
<20071208123058.7364.25491.stgit@rover>
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.
 
Show 7 quoted lines
> @@ -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 ] : [];
-- 
Jakub Narebski
Previous: Petr BaudisNext: Junio C Hamano
Message 2 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.