Merge branch 'jk/maint-http-half-auth-fetch'
authorJunio C Hamano <gitster@pobox.com>
Tue, 20 Nov 2012 18:30:17 +0000 (10:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Nov 2012 18:30:17 +0000 (10:30 -0800)
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

1  2 
remote-curl.c
t/lib-httpd/apache.conf
t/t5551-http-fetch.sh

diff --cc remote-curl.c
Simple merge
Simple merge
index 5060879d6d93d1f10a1db690bd42c19ee5ec1ae4,5f174da3c7be992c7bc52ee42050775b41af9cc5..c5cd2e348c6fe47af7d94ef6852757c301f8097a
@@@ -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' '