]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Make config_to_multi return [] instead of [undef]
authorPetr Baudis <redacted>
Sat, 8 Dec 2007 11:30:59 +0000 (12:30 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:12 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 2abb43d7d28cb09e323fb1eebe52f365aff9730638d27d9562864cbf2bca286e..0eb4fb1f3ca497bd36c13a5c81e88d2ecc86cc0bea0f1956587a5f629f33550e 100755 (executable)
@@ -1512,7 +1512,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 {
This page took 0.208078 seconds and 4 git commands to generate.