diff options
author | Jeff King <peff@peff.net> | 2011-06-09 11:52:43 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-06-22 11:24:51 -0700 |
commit | c5d6350bdc8d0d8bd4bd1aa0273313e71cd548f6 (patch) | |
tree | 1a2a1f3d095ba519e1f3ef019d8cce217117fafb /t | |
parent | 1c2c9bee1bad9a4133a934d04c32b033cc16c8aa (diff) | |
download | git-c5d6350bdc8d0d8bd4bd1aa0273313e71cd548f6.tar.gz git-c5d6350bdc8d0d8bd4bd1aa0273313e71cd548f6.tar.xz |
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>
Diffstat (limited to 't')
-rwxr-xr-x | t/t1300-repo-config.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 584e956ac..3e140c18f 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 |