File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -147,29 +147,33 @@ test_config () {
147
147
# Test clone/fetch/push with protocol.allow user defined default
148
148
test_expect_success " clone $desc (enabled)" '
149
149
rm -rf tmp.git &&
150
- git config --global protocol.allow always &&
150
+ test_config_global protocol.allow always &&
151
151
git clone --bare "$url" tmp.git
152
152
'
153
153
154
154
test_expect_success " fetch $desc (enabled)" '
155
+ test_config_global protocol.allow always &&
155
156
git -C tmp.git fetch
156
157
'
157
158
158
159
test_expect_success " push $desc (enabled)" '
160
+ test_config_global protocol.allow always &&
159
161
git -C tmp.git push origin HEAD:pushed
160
162
'
161
163
162
164
test_expect_success " push $desc (disabled)" '
163
- git config --global protocol.allow never &&
165
+ test_config_global protocol.allow never &&
164
166
test_must_fail git -C tmp.git push origin HEAD:pushed
165
167
'
166
168
167
169
test_expect_success " fetch $desc (disabled)" '
170
+ test_config_global protocol.allow never &&
168
171
test_must_fail git -C tmp.git fetch
169
172
'
170
173
171
174
test_expect_success " clone $desc (disabled)" '
172
175
rm -rf tmp.git &&
176
+ test_config_global protocol.allow never &&
173
177
test_must_fail git clone --bare "$url" tmp.git
174
178
'
175
179
}
You can’t perform that action at this time.
0 commit comments