summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-30 15:03:21 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-30 15:03:21 -0700
commit9315f271e3fffd1e60b23052c29704923da5837a (patch)
tree4efed1edc2e056fcc89e5aaebc78220eb54df904
parent95d67879735cfecfdd85f89e59d993c5b4de8835 (diff)
parent30c586ff15935d4439ab31f9ab8424f28e6b461e (diff)
downloadgit-9315f271e3fffd1e60b23052c29704923da5837a.tar.gz
Merge branch 'jk/lib-proto-disable-cleanup' into maint-2.12
-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 02f49cb409..83babe57d9 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
'
}