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

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

From
Petr Baudis <pasky@suse.cz>
Date
Dec 8, 2007, 12:30 UTC
Message-ID
<20071208123058.7364.25491.stgit@rover>

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.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 491a3f4..d5505a4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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 ] : [];
 }
 
 sub git_get_project_config {
Next: Jakub Narebski
Message 1 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.