Commit 32d8050a authored by Lea Wiemann's avatar Lea Wiemann Committed by Junio C Hamano 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: default avatarLea Wiemann <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 850d3a7c
......@@ -565,7 +565,7 @@ sub config {
my $E = shift;
if ($E->value() == 1) {
# Key not found.
return undef;
} else {
throw $E;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment