summaryrefslogtreecommitdiff
path: root/t/t5551-http-fetch-smart.sh
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2019-03-22 19:01:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-24 12:29:52 (GMT)
commit3a9e1ad78d97e008aaaf7e3cc0eaa231a742931c (patch)
tree87243fcfed55a0d19638281122d20063d35829ef /t/t5551-http-fetch-smart.sh
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
downloadgit-3a9e1ad78d97e008aaaf7e3cc0eaa231a742931c.zip
git-3a9e1ad78d97e008aaaf7e3cc0eaa231a742931c.tar.gz
git-3a9e1ad78d97e008aaaf7e3cc0eaa231a742931c.tar.bz2
t5551: mark half-auth no-op fetch test as v0-only
When using protocol v0, upload-pack over HTTP permits a "half-auth" configuration in which, at the web server layer, the info/refs path is not protected by authentication but the git-upload-pack path is, so that a user can perform fetches that do not download any objects without authentication, but still needs authentication to download objects. But protocol v2 does not support this, because both ref and pack are obtained from the git-upload-pack path. Mark the test verifying this behavior as protocol v0-only, with a description of what needs to be done to make v2 support this. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5551-http-fetch-smart.sh')
-rwxr-xr-xt/t5551-http-fetch-smart.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index ba83e56..2391158 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -151,7 +151,17 @@ test_expect_success 'clone from auth-only-for-objects repository' '
test_expect_success 'no-op half-auth fetch does not require a password' '
set_askpass wrong &&
- git --git-dir=half-auth fetch &&
+
+ # NEEDSWORK: When using HTTP(S), protocol v0 supports a "half-auth"
+ # configuration with authentication required only when downloading
+ # objects and not refs, by having the HTTP server only require
+ # authentication for the "git-upload-pack" path and not "info/refs".
+ # This is not possible with protocol v2, since both objects and refs
+ # are obtained from the "git-upload-pack" path. A solution to this is
+ # to teach the server and client to be able to inline ls-refs requests
+ # as an Extra Parameter (see pack-protocol.txt), so that "info/refs"
+ # can serve refs, just like it does in protocol v0.
+ GIT_TEST_PROTOCOL_VERSION=0 git --git-dir=half-auth fetch &&
expect_askpass none
'