Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-18 04:21:43 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-18 04:21:43 +0300
commit483e09e810796786baf7a9139680f6d2f2470829 (patch)
tree41a503f778c0140db8dc565a94aa6f23869efad8 /t/t1300-config.sh
parente68f62be8dd65cd181be20b414fa45126b39d481 (diff)
parentf276e2a469430999ff7e3735ea7b41508ed1abd8 (diff)
Merge branch 'ak/config-bad-bool-error'
The error message given when a configuration variable that is expected to have a boolean value has been improved. * ak/config-bad-bool-error: config: improve error message for boolean config
Diffstat (limited to 't/t1300-config.sh')
-rwxr-xr-xt/t1300-config.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh
index 936d72041b..e0dd5d65ce 100755
--- a/t/t1300-config.sh
+++ b/t/t1300-config.sh
@@ -675,6 +675,13 @@ test_expect_success 'invalid unit' '
test_i18ngrep "bad numeric config value .1auto. for .aninvalid.unit. in file .git/config: invalid unit" actual
'
+test_expect_success 'invalid unit boolean' '
+ git config commit.gpgsign "1true" &&
+ test_cmp_config 1true commit.gpgsign &&
+ test_must_fail git config --bool --get commit.gpgsign 2>actual &&
+ test_i18ngrep "bad boolean config value .1true. for .commit.gpgsign." actual
+'
+
test_expect_success 'line number is reported correctly' '
printf "[bool]\n\tvar\n" >invalid &&
test_must_fail git config -f invalid --path bool.var 2>actual &&