From: Junio C Hamano Date: Tue, 20 Nov 2012 18:30:17 +0000 (-0800) Subject: Merge branch 'jk/maint-http-half-auth-fetch' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a9bb4e55a3a552a705f8a6222e4523ed27bb7cc8;p=git.git Merge branch 'jk/maint-http-half-auth-fetch' Fixes fetch from servers that ask for auth only during the actual packing phase. This is not really a recommended configuration, but it cleans up the code at the same time. * jk/maint-http-half-auth-fetch: remote-curl: retry failed requests for auth even with gzip remote-curl: hoist gzip buffer size to top of post_rpc --- a9bb4e55a3a552a705f8a6222e4523ed27bb7cc8 diff --cc t/t5551-http-fetch.sh index 5060879d6,5f174da3c..c5cd2e348 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@@ -130,18 -129,21 +130,33 @@@ test_expect_success 'clone from auth-on test_cmp expect actual ' + test_expect_success 'clone from auth-only-for-objects repository' ' + echo two >expect && + set_askpass user@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 && + test_cmp expect actual + ' + + test_expect_success 'no-op half-auth fetch does not require a password' ' + set_askpass wrong && + git --git-dir=half-auth fetch && + expect_askpass none + ' + +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' '