From e96c19c50fb0807570b85cb5b8aae6dfcfa9b9ec Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Sun, 10 Apr 2011 22:54:18 +0200 Subject: config: support values longer than 1023 bytes parse_value in config.c has a static buffer of 1024 bytes that it parse the value into. This can sometimes be a problem when a config file contains very long values. It's particularly amusing that git-config already is able to write such files, so it should probably be able to read them as well. Fix this by using a strbuf instead of a fixed-size buffer. Signed-off-by: Erik Faye-Lund Acked-by: Jeff King Signed-off-by: Junio C Hamano --- t/t1303-wacky-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t1303-wacky-config.sh b/t/t1303-wacky-config.sh index 080117c6bc..46103a1591 100755 --- a/t/t1303-wacky-config.sh +++ b/t/t1303-wacky-config.sh @@ -44,7 +44,7 @@ LONG_VALUE=$(printf "x%01021dx a" 7) test_expect_success 'do not crash on special long config line' ' setup && git config section.key "$LONG_VALUE" && - check section.key "fatal: bad config file line 2 in .git/config" + check section.key "$LONG_VALUE" ' test_done -- cgit v1.2.3