From c5d6350bdc8d0d8bd4bd1aa0273313e71cd548f6 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 9 Jun 2011 11:52:43 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- t/t1300-repo-config.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't') diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 584e956ac5..3e140c18f4 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -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 -- cgit v1.2.3