@@ -213,7 +213,9 @@ test_expect_success 'Prohibited LF in comment' '
213
213
test_must_fail git config ${mode_set} --comment="a${LF}b" section.k v
214
214
'
215
215
216
- test_expect_success ' non-match result' ' test_cmp expect .git/config'
216
+ test_expect_success ' non-match result' '
217
+ test_cmp expect .git/config
218
+ '
217
219
218
220
test_expect_success ' find mixed-case key by canonical name' '
219
221
test_cmp_config Second sections.whatever
455
457
test_cmp expect .git/config
456
458
'
457
459
458
- test_expect_success ' invalid key' ' test_must_fail git config inval.2key blabla'
460
+ test_expect_success ' invalid key' '
461
+ test_must_fail git config inval.2key blabla
462
+ '
459
463
460
- test_expect_success ' correct key' ' git config 123456.a123 987'
464
+ test_expect_success ' correct key' '
465
+ git config 123456.a123 987
466
+ '
461
467
462
468
test_expect_success ' hierarchical section' '
463
469
git config Version.1.2.3eX.Alpha beta
@@ -490,6 +496,7 @@ test_expect_success 'working --list' '
490
496
git config ${mode_prefix}list > output &&
491
497
test_cmp expect output
492
498
'
499
+
493
500
test_expect_success ' --list without repo produces empty output' '
494
501
git --git-dir=nonexistent config ${mode_prefix}list >output &&
495
502
test_must_be_empty output
@@ -887,16 +894,17 @@ test_expect_success bool '
887
894
git config --bool --get bool.true$i >>result &&
888
895
git config --bool --get bool.false$i >>result || return 1
889
896
done &&
890
- test_cmp expect result'
897
+ test_cmp expect result
898
+ '
891
899
892
900
test_expect_success ' invalid bool (--get)' '
893
-
894
901
git config ${mode_set} bool.nobool foobar &&
895
- test_must_fail git config --bool --get bool.nobool'
902
+ test_must_fail git config --bool --get bool.nobool
903
+ '
896
904
897
905
test_expect_success ' invalid bool (set)' '
898
-
899
- test_must_fail git config --bool bool.nobool foobar '
906
+ test_must_fail git config --bool bool.nobool foobar
907
+ '
900
908
901
909
test_expect_success ' set --bool' '
902
910
cat >expect <<\EOF &&
999
1007
git config --path path.home "~/" &&
1000
1008
git config --path path.normal "/dev/null" &&
1001
1009
git config --path path.trailingtilde "foo~" &&
1002
- test_cmp expect .git/config'
1010
+ test_cmp expect .git/config
1011
+ '
1003
1012
1004
1013
if test_have_prereq ! MINGW && test " ${HOME+set} "
1005
1014
then
@@ -1117,10 +1126,13 @@ EOF
1117
1126
1118
1127
test_expect_success ' key with newline' '
1119
1128
test_must_fail git config ${mode_get} "key.with
1120
- newline" 123'
1129
+ newline" 123
1130
+ '
1121
1131
1122
- test_expect_success ' value with newline' ' git config ${mode_set} key.sub value.with\\\
1123
- newline'
1132
+ test_expect_success ' value with newline' '
1133
+ git config ${mode_set} key.sub value.with\\\
1134
+ newline
1135
+ '
1124
1136
1125
1137
cat > .git/config << \EOF
1126
1138
[section]
@@ -1330,7 +1342,6 @@ test_expect_success 'multiple git -c appends config' '
1330
1342
'
1331
1343
1332
1344
test_expect_success ' last one wins: two level vars' '
1333
-
1334
1345
# sec.var and sec.VAR are the same variable, as the first
1335
1346
# and the last level of a configuration variable name is
1336
1347
# case insensitive.
@@ -1349,7 +1360,6 @@ test_expect_success 'last one wins: two level vars' '
1349
1360
'
1350
1361
1351
1362
test_expect_success ' last one wins: three level vars' '
1352
-
1353
1363
# v.a.r and v.A.r are not the same variable, as the middle
1354
1364
# level of a three-level configuration variable name is
1355
1365
# case sensitive.
0 commit comments