pathspec: rename match_pathspec_depth() to match_pathspec()
[gitweb.git] / t / t5551-http-fetch.sh
index f036392c295830c66cdb4b0ec37afd623e7d5549..a124efe11459905a11d91bfb32f8388bf4876c1d 100755 (executable)
@@ -113,9 +113,13 @@ test_expect_success 'follow redirects (302)' '
        git clone $HTTPD_URL/smart-redir-temp/repo.git --quiet repo-t
 '
 
+test_expect_success 'redirects re-root further requests' '
+       git clone $HTTPD_URL/smart-redir-limited/repo.git repo-redir-limited
+'
+
 test_expect_success 'clone from password-protected repository' '
        echo two >expect &&
-       set_askpass user@host &&
+       set_askpass user@host pass@host &&
        git clone --bare "$HTTPD_URL/auth/smart/repo.git" smart-auth &&
        expect_askpass both user@host &&
        git --git-dir=smart-auth log -1 --format=%s >actual &&
@@ -133,7 +137,7 @@ test_expect_success 'clone from auth-only-for-push repository' '
 
 test_expect_success 'clone from auth-only-for-objects repository' '
        echo two >expect &&
-       set_askpass user@host &&
+       set_askpass user@host pass@host &&
        git clone --bare "$HTTPD_URL/auth-fetch/smart/repo.git" half-auth &&
        expect_askpass both user@host &&
        git --git-dir=half-auth log -1 --format=%s >actual &&
@@ -146,6 +150,13 @@ test_expect_success 'no-op half-auth fetch does not require a password' '
        expect_askpass none
 '
 
+test_expect_success 'redirects send auth to new location' '
+       set_askpass user@host pass@host &&
+       git -c credential.useHttpPath=true \
+         clone $HTTPD_URL/smart-redir-auth/repo.git repo-redir-auth &&
+       expect_askpass both user@host auth/smart/repo.git
+'
+
 test_expect_success 'disable dumb http on server' '
        git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
                config http.getanyfile false