diff options
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-x | t/t5601-clone.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 664c913866..329ae599fd 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -40,7 +40,7 @@ test_expect_success 'clone with excess parameters (2)' ' ' -test_expect_success C_LOCALE_OUTPUT 'output from clone' ' +test_expect_success 'output from clone' ' rm -fr dst && git clone -n "file://$(pwd)/src" dst >output 2>&1 && test $(grep Clon output | wc -l) = 1 @@ -759,6 +759,15 @@ test_expect_success 'partial clone using HTTP' ' partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server" ' +test_expect_success 'reject cloning shallow repository using HTTP' ' + test_when_finished "rm -rf repo" && + git clone --bare --no-local --depth=1 src "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && + test_must_fail git clone --reject-shallow $HTTPD_URL/smart/repo.git repo 2>err && + test_i18ngrep -e "source repository is shallow, reject to clone." err && + + git clone --no-reject-shallow $HTTPD_URL/smart/repo.git repo +' + # DO NOT add non-httpd-specific tests here, because the last part of this # test script is only executed when httpd is available and enabled. |