config: avoid segfault when parsing command-line config
We already check for an empty key on the left side of an equals, but we would segfault if there was no content at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1c2c9bee1b
commit
c5d6350bdc
@ -918,4 +918,8 @@ test_expect_success 'git -c complains about empty key' '
|
||||
test_must_fail git -c "=foo" rev-parse
|
||||
'
|
||||
|
||||
test_expect_success 'git -c complains about empty key and value' '
|
||||
test_must_fail git -c "" rev-parse
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user