@@ -19,10 +19,6 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' '
19
19
)
20
20
'
21
21
22
- modebits () {
23
- ls -l " $1 " | sed -e ' s|^\(..........\).*|\1|'
24
- }
25
-
26
22
for u in 002 022
27
23
do
28
24
test_expect_success POSIXPERM " shared=1 does not clear bits preset by umask $u " '
88
84
89
85
rm -f .git/info/refs &&
90
86
git update-server-info &&
91
- actual="$(modebits .git/info/refs)" &&
87
+ actual="$(test_modebits .git/info/refs)" &&
92
88
verbose test "x$actual" = "x-$y"
93
89
94
90
'
98
94
99
95
rm -f .git/info/refs &&
100
96
git update-server-info &&
101
- actual="$(modebits .git/info/refs)" &&
97
+ actual="$(test_modebits .git/info/refs)" &&
102
98
verbose test "x$actual" = "x-$x"
103
99
104
100
'
@@ -111,7 +107,7 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' '
111
107
umask 002 &&
112
108
git update-server-info &&
113
109
echo "-rw-rw-r--" >expect &&
114
- modebits .git/info/refs >actual &&
110
+ test_modebits .git/info/refs >actual &&
115
111
test_cmp expect actual
116
112
'
117
113
@@ -177,7 +173,7 @@ test_expect_success POSIXPERM 'remote init does not use config from cwd' '
177
173
umask 0022 &&
178
174
git init --bare child.git &&
179
175
echo "-rw-r--r--" >expect &&
180
- modebits child.git/config >actual &&
176
+ test_modebits child.git/config >actual &&
181
177
test_cmp expect actual
182
178
'
183
179
@@ -187,7 +183,7 @@ test_expect_success POSIXPERM 're-init respects core.sharedrepository (local)' '
187
183
echo whatever >templates/foo &&
188
184
git init --template=templates &&
189
185
echo "-rw-rw-rw-" >expect &&
190
- modebits .git/foo >actual &&
186
+ test_modebits .git/foo >actual &&
191
187
test_cmp expect actual
192
188
'
193
189
@@ -198,7 +194,7 @@ test_expect_success POSIXPERM 're-init respects core.sharedrepository (remote)'
198
194
test_path_is_missing child.git/foo &&
199
195
git init --bare --template=../templates child.git &&
200
196
echo "-rw-rw-rw-" >expect &&
201
- modebits child.git/foo >actual &&
197
+ test_modebits child.git/foo >actual &&
202
198
test_cmp expect actual
203
199
'
204
200
@@ -209,7 +205,7 @@ test_expect_success POSIXPERM 'template can set core.sharedrepository' '
209
205
cp .git/config templates/config &&
210
206
git init --bare --template=../templates child.git &&
211
207
echo "-rw-rw-rw-" >expect &&
212
- modebits child.git/HEAD >actual &&
208
+ test_modebits child.git/HEAD >actual &&
213
209
test_cmp expect actual
214
210
'
215
211
0 commit comments