summaryrefslogtreecommitdiff
path: root/t/t1303-wacky-config.sh
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2011-04-10 20:54:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-04-11 21:10:06 (GMT)
commite96c19c50fb0807570b85cb5b8aae6dfcfa9b9ec (patch)
tree27fa8b42fe693cb101c83c5269f763f1e68ab7de /t/t1303-wacky-config.sh
parent5e7a5d97f8a74181634a70e0e7b1464855c5af2d (diff)
downloadgit-e96c19c50fb0807570b85cb5b8aae6dfcfa9b9ec.zip
git-e96c19c50fb0807570b85cb5b8aae6dfcfa9b9ec.tar.gz
git-e96c19c50fb0807570b85cb5b8aae6dfcfa9b9ec.tar.bz2
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 <kusmabite@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1303-wacky-config.sh')
-rwxr-xr-xt/t1303-wacky-config.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1303-wacky-config.sh b/t/t1303-wacky-config.sh
index 080117c..46103a1 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