@@ -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' '
@@ -1057,12 +1057,12 @@ test_expect_success 'git -c "key=value" support' '
1057
1057
true
1058
1058
EOF
1059
1059
{
1060
- git -c core .name=value config core .name &&
1060
+ git -c section .name=value config section .name &&
1061
1061
git -c foo.CamelCase=value config foo.camelcase &&
1062
1062
git -c foo.flag config --bool foo.flag
1063
1063
} >actual &&
1064
1064
test_cmp expect actual &&
1065
- test_must_fail git -c name=value config core .name
1065
+ test_must_fail git -c name=value config section .name
1066
1066
'
1067
1067
1068
1068
# We just need a type-specifier here that cares about the
@@ -1107,7 +1107,7 @@ test_expect_success 'aliases can be CamelCased' '
1107
1107
1108
1108
test_expect_success ' git -c does not split values on equals' '
1109
1109
echo "value with = in it" >expect &&
1110
- 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 &&
1111
1111
test_cmp expect actual
1112
1112
'
1113
1113
@@ -1838,53 +1838,53 @@ do
1838
1838
done
1839
1839
1840
1840
cat > .git/config << -\EOF &&
1841
- [core ]
1841
+ [section ]
1842
1842
foo = true
1843
1843
number = 10
1844
1844
big = 1M
1845
1845
EOF
1846
1846
1847
1847
test_expect_success ' identical modern --type specifiers are allowed' '
1848
- test_cmp_config 1048576 --type=int --type=int core .big
1848
+ test_cmp_config 1048576 --type=int --type=int section .big
1849
1849
'
1850
1850
1851
1851
test_expect_success ' identical legacy --type specifiers are allowed' '
1852
- test_cmp_config 1048576 --int --int core .big
1852
+ test_cmp_config 1048576 --int --int section .big
1853
1853
'
1854
1854
1855
1855
test_expect_success ' identical mixed --type specifiers are allowed' '
1856
- test_cmp_config 1048576 --int --type=int core .big
1856
+ test_cmp_config 1048576 --int --type=int section .big
1857
1857
'
1858
1858
1859
1859
test_expect_success ' non-identical modern --type specifiers are not allowed' '
1860
- 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 &&
1861
1861
test_i18ngrep "only one type at a time" error
1862
1862
'
1863
1863
1864
1864
test_expect_success ' non-identical legacy --type specifiers are not allowed' '
1865
- test_must_fail git config --int --bool core .big 2>error &&
1865
+ test_must_fail git config --int --bool section .big 2>error &&
1866
1866
test_i18ngrep "only one type at a time" error
1867
1867
'
1868
1868
1869
1869
test_expect_success ' non-identical mixed --type specifiers are not allowed' '
1870
- 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 &&
1871
1871
test_i18ngrep "only one type at a time" error
1872
1872
'
1873
1873
1874
1874
test_expect_success ' --type allows valid type specifiers' '
1875
- test_cmp_config true --type=bool core .foo
1875
+ test_cmp_config true --type=bool section .foo
1876
1876
'
1877
1877
1878
1878
test_expect_success ' --no-type unsets type specifiers' '
1879
- test_cmp_config 10 --type=bool --no-type core .number
1879
+ test_cmp_config 10 --type=bool --no-type section .number
1880
1880
'
1881
1881
1882
1882
test_expect_success ' unset type specifiers may be reset to conflicting ones' '
1883
- 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
1884
1884
'
1885
1885
1886
1886
test_expect_success ' --type rejects unknown specifiers' '
1887
- test_must_fail git config --type=nonsense core .foo 2>error &&
1887
+ test_must_fail git config --type=nonsense section .foo 2>error &&
1888
1888
test_i18ngrep "unrecognized --type argument" error
1889
1889
'
1890
1890
0 commit comments