remote-curl: let users turn off smart http
[gitweb.git] / t / t5551-http-fetch.sh
index 2db5c3564181818efdf885188d7cc597024c6f12..8427943f0e74730a6c5bff0b27a6c50f1108bf7f 100755 (executable)
@@ -129,6 +129,18 @@ test_expect_success 'clone from auth-only-for-push repository' '
        test_cmp expect actual
 '
 
+test_expect_success 'disable dumb http on server' '
+       git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
+               config http.getanyfile false
+'
+
+test_expect_success 'GIT_SMART_HTTP can disable smart http' '
+       (GIT_SMART_HTTP=0 &&
+        export GIT_SMART_HTTP &&
+        cd clone &&
+        test_must_fail git fetch)
+'
+
 test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 
 test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '