@@ -12,75 +12,75 @@ test_expect_success 'clear default config' '
12
12
'
13
13
14
14
cat > expect << EOF
15
- [core ]
15
+ [section ]
16
16
penguin = little blue
17
17
EOF
18
18
test_expect_success ' initial' '
19
- git config core .penguin "little blue" &&
19
+ git config section .penguin "little blue" &&
20
20
test_cmp expect .git/config
21
21
'
22
22
23
23
cat > expect << EOF
24
- [core ]
24
+ [section ]
25
25
penguin = little blue
26
26
Movie = BadPhysics
27
27
EOF
28
28
test_expect_success ' mixed case' '
29
- git config Core .Movie BadPhysics &&
29
+ git config Section .Movie BadPhysics &&
30
30
test_cmp expect .git/config
31
31
'
32
32
33
33
cat > expect << EOF
34
- [core ]
34
+ [section ]
35
35
penguin = little blue
36
36
Movie = BadPhysics
37
- [Cores ]
37
+ [Sections ]
38
38
WhatEver = Second
39
39
EOF
40
40
test_expect_success ' similar section' '
41
- git config Cores .WhatEver Second &&
41
+ git config Sections .WhatEver Second &&
42
42
test_cmp expect .git/config
43
43
'
44
44
45
45
cat > expect << EOF
46
- [core ]
46
+ [section ]
47
47
penguin = little blue
48
48
Movie = BadPhysics
49
49
UPPERCASE = true
50
- [Cores ]
50
+ [Sections ]
51
51
WhatEver = Second
52
52
EOF
53
53
test_expect_success ' uppercase section' '
54
- git config CORE .UPPERCASE true &&
54
+ git config SECTION .UPPERCASE true &&
55
55
test_cmp expect .git/config
56
56
'
57
57
58
58
test_expect_success ' replace with non-match' '
59
- git config core .penguin kingpin !blue
59
+ git config section .penguin kingpin !blue
60
60
'
61
61
62
62
test_expect_success ' replace with non-match (actually matching)' '
63
- git config core .penguin "very blue" !kingpin
63
+ git config section .penguin "very blue" !kingpin
64
64
'
65
65
66
66
cat > expect << EOF
67
- [core ]
67
+ [section ]
68
68
penguin = very blue
69
69
Movie = BadPhysics
70
70
UPPERCASE = true
71
71
penguin = kingpin
72
- [Cores ]
72
+ [Sections ]
73
73
WhatEver = Second
74
74
EOF
75
75
76
76
test_expect_success ' non-match result' ' test_cmp expect .git/config'
77
77
78
78
test_expect_success ' find mixed-case key by canonical name' '
79
- test_cmp_config Second cores .whatever
79
+ test_cmp_config Second sections .whatever
80
80
'
81
81
82
82
test_expect_success ' find mixed-case key by non-canonical name' '
83
- test_cmp_config Second CoReS .WhAtEvEr
83
+ test_cmp_config Second SeCtIoNs .WhAtEvEr
84
84
'
85
85
86
86
test_expect_success ' subsections are not canonicalized by git-config' '
@@ -469,7 +469,8 @@ test_expect_success 'new variable inserts into proper section' '
469
469
'
470
470
471
471
test_expect_success ' alternative --file (non-existing file should fail)' '
472
- test_must_fail git config --file non-existing-config -l
472
+ test_must_fail git config --file non-existing-config -l &&
473
+ test_must_fail git config --file non-existing-config test.xyzzy
473
474
'
474
475
475
476
cat > other-config << EOF
@@ -506,10 +507,6 @@ test_expect_success 'editing stdin is an error' '
506
507
507
508
test_expect_success ' refer config from subdirectory' '
508
509
mkdir x &&
509
- test_cmp_config -C x strasse --get --file ../other-config ein.bahn
510
- '
511
-
512
- test_expect_success ' refer config from subdirectory via --file' '
513
510
test_cmp_config -C x strasse --file=../other-config --get ein.bahn
514
511
'
515
512
@@ -1036,11 +1033,6 @@ test_expect_success SYMLINKS 'symlinked configuration' '
1036
1033
test_cmp expect actual
1037
1034
'
1038
1035
1039
- test_expect_success ' nonexistent configuration' '
1040
- test_must_fail git config --file=doesnotexist --list &&
1041
- test_must_fail git config --file=doesnotexist test.xyzzy
1042
- '
1043
-
1044
1036
test_expect_success SYMLINKS ' symlink to nonexistent configuration' '
1045
1037
ln -s doesnotexist linktonada &&
1046
1038
ln -s linktonada linktolinktonada &&
@@ -1065,12 +1057,12 @@ test_expect_success 'git -c "key=value" support' '
1065
1057
true
1066
1058
EOF
1067
1059
{
1068
- git -c core .name=value config core .name &&
1060
+ git -c section .name=value config section .name &&
1069
1061
git -c foo.CamelCase=value config foo.camelcase &&
1070
1062
git -c foo.flag config --bool foo.flag
1071
1063
} >actual &&
1072
1064
test_cmp expect actual &&
1073
- test_must_fail git -c name=value config core .name
1065
+ test_must_fail git -c name=value config section .name
1074
1066
'
1075
1067
1076
1068
# We just need a type-specifier here that cares about the
@@ -1115,7 +1107,7 @@ test_expect_success 'aliases can be CamelCased' '
1115
1107
1116
1108
test_expect_success ' git -c does not split values on equals' '
1117
1109
echo "value with = in it" >expect &&
1118
- git -c core .foo="value with = in it" config core .foo >actual &&
1110
+ git -c section .foo="value with = in it" config section .foo >actual &&
1119
1111
test_cmp expect actual
1120
1112
'
1121
1113
@@ -1846,53 +1838,53 @@ do
1846
1838
done
1847
1839
1848
1840
cat > .git/config << -\EOF &&
1849
- [core ]
1841
+ [section ]
1850
1842
foo = true
1851
1843
number = 10
1852
1844
big = 1M
1853
1845
EOF
1854
1846
1855
1847
test_expect_success ' identical modern --type specifiers are allowed' '
1856
- test_cmp_config 1048576 --type=int --type=int core .big
1848
+ test_cmp_config 1048576 --type=int --type=int section .big
1857
1849
'
1858
1850
1859
1851
test_expect_success ' identical legacy --type specifiers are allowed' '
1860
- test_cmp_config 1048576 --int --int core .big
1852
+ test_cmp_config 1048576 --int --int section .big
1861
1853
'
1862
1854
1863
1855
test_expect_success ' identical mixed --type specifiers are allowed' '
1864
- test_cmp_config 1048576 --int --type=int core .big
1856
+ test_cmp_config 1048576 --int --type=int section .big
1865
1857
'
1866
1858
1867
1859
test_expect_success ' non-identical modern --type specifiers are not allowed' '
1868
- test_must_fail git config --type=int --type=bool core .big 2>error &&
1860
+ test_must_fail git config --type=int --type=bool section .big 2>error &&
1869
1861
test_i18ngrep "only one type at a time" error
1870
1862
'
1871
1863
1872
1864
test_expect_success ' non-identical legacy --type specifiers are not allowed' '
1873
- test_must_fail git config --int --bool core .big 2>error &&
1865
+ test_must_fail git config --int --bool section .big 2>error &&
1874
1866
test_i18ngrep "only one type at a time" error
1875
1867
'
1876
1868
1877
1869
test_expect_success ' non-identical mixed --type specifiers are not allowed' '
1878
- test_must_fail git config --type=int --bool core .big 2>error &&
1870
+ test_must_fail git config --type=int --bool section .big 2>error &&
1879
1871
test_i18ngrep "only one type at a time" error
1880
1872
'
1881
1873
1882
1874
test_expect_success ' --type allows valid type specifiers' '
1883
- test_cmp_config true --type=bool core .foo
1875
+ test_cmp_config true --type=bool section .foo
1884
1876
'
1885
1877
1886
1878
test_expect_success ' --no-type unsets type specifiers' '
1887
- test_cmp_config 10 --type=bool --no-type core .number
1879
+ test_cmp_config 10 --type=bool --no-type section .number
1888
1880
'
1889
1881
1890
1882
test_expect_success ' unset type specifiers may be reset to conflicting ones' '
1891
- test_cmp_config 1048576 --type=bool --no-type --type=int core .big
1883
+ test_cmp_config 1048576 --type=bool --no-type --type=int section .big
1892
1884
'
1893
1885
1894
1886
test_expect_success ' --type rejects unknown specifiers' '
1895
- test_must_fail git config --type=nonsense core .foo 2>error &&
1887
+ test_must_fail git config --type=nonsense section .foo 2>error &&
1896
1888
test_i18ngrep "unrecognized --type argument" error
1897
1889
'
1898
1890
0 commit comments