From 2f666581bbc1895cf66a7007fb222026b299deb9 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 8 Sep 2013 04:38:22 -0400 Subject: config: make numeric parsing errors more clear If we try to parse an integer config argument and get a number outside of the representable range, we die with the cryptic message: "bad config value for '%s'". We can improve two things: 1. Show the value that produced the error (e.g., bad config value '3g' for 'foo.bar'). 2. Mention the reason the value was rejected (e.g., "invalid unit" versus "out of range"). A few tests need to be updated with the new output, but that should not be representative of real-world breakage, as scripts should not be depending on the exact text of our stderr output, which is subject to i18n anyway. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t4055-diff-context.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t4055-diff-context.sh') diff --git a/t/t4055-diff-context.sh b/t/t4055-diff-context.sh index 97172b46b2..cd0454356a 100755 --- a/t/t4055-diff-context.sh +++ b/t/t4055-diff-context.sh @@ -73,7 +73,7 @@ test_expect_success 'plumbing not affected' ' test_expect_success 'non-integer config parsing' ' git config diff.context no && test_must_fail git diff 2>output && - test_i18ngrep "bad config value" output + test_i18ngrep "bad numeric config value" output ' test_expect_success 'negative integer config parsing' ' -- cgit v1.2.3