From: Lea Wiemann Date: Sun, 1 Jun 2008 20:34:47 +0000 (+0200) Subject: Git.pm: fix return value of config method X-Git-Tag: v1.5.6-rc1~14 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=32d8050a86f8de0253430b12711354e66a317f29;p=git.git Git.pm: fix return value of config method If config is called in array context, it is supposed to return all values set for the given option key. This works for all cases except if there is no value set at all. In that case, it wrongly returns (undef) instead of (). This fixes the return statement so that it returns undef in scalar context but an empty array in array context. Signed-off-by: Lea Wiemann Signed-off-by: Junio C Hamano --- diff --git a/perl/Git.pm b/perl/Git.pm index e2141b638..97e61efaf 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -565,7 +565,7 @@ sub config { my $E = shift; if ($E->value() == 1) { # Key not found. - return undef; + return; } else { throw $E; }