зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/lib-proto-disable-cleanup' into maint-2.12
This commit is contained in:
Коммит
9315f271e3
|
@ -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
|
||||
'
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче