aboutsummaryrefslogtreecommitdiff
path: root/t/lib-proto-disable.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-04 12:40:37 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-04 12:40:37 -0700
commit230ce07d134f597a8107d3ed5d76d212ff90db70 (patch)
tree9f9de19330fc4c7edcee3b286ef68d1a7561284c /t/lib-proto-disable.sh
parent4384e3cde2ce8ecd194202e171ae16333d241326 (diff)
parent7234152e66e52c7601789f6de822bb39590f0595 (diff)
downloadgit-230ce07d134f597a8107d3ed5d76d212ff90db70.tar.gz
git-230ce07d134f597a8107d3ed5d76d212ff90db70.tar.xz
Merge tag 'v2.13.5' into maint
Diffstat (limited to 't/lib-proto-disable.sh')
-rw-r--r--t/lib-proto-disable.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/lib-proto-disable.sh b/t/lib-proto-disable.sh
index 02f49cb40..83babe57d 100644
--- a/t/lib-proto-disable.sh
+++ b/t/lib-proto-disable.sh
@@ -147,29 +147,33 @@ test_config () {
# Test clone/fetch/push with protocol.allow user defined default
test_expect_success "clone $desc (enabled)" '
rm -rf tmp.git &&
- git config --global protocol.allow always &&
+ test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
'
test_expect_success "fetch $desc (enabled)" '
+ test_config_global protocol.allow always &&
git -C tmp.git fetch
'
test_expect_success "push $desc (enabled)" '
+ test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
'
test_expect_success "push $desc (disabled)" '
- git config --global protocol.allow never &&
+ test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
'
test_expect_success "fetch $desc (disabled)" '
+ test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
'
test_expect_success "clone $desc (disabled)" '
rm -rf tmp.git &&
+ test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
'
}