Skip to content

Commit 3a9e1ad

Browse files
jonathantanmygitster
authored andcommitted
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 <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aeb582a commit 3a9e1ad

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

t/t5551-http-fetch-smart.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,17 @@ test_expect_success 'clone from auth-only-for-objects repository' '
151151

152152
test_expect_success 'no-op half-auth fetch does not require a password' '
153153
set_askpass wrong &&
154-
git --git-dir=half-auth fetch &&
154+
155+
# NEEDSWORK: When using HTTP(S), protocol v0 supports a "half-auth"
156+
# configuration with authentication required only when downloading
157+
# objects and not refs, by having the HTTP server only require
158+
# authentication for the "git-upload-pack" path and not "info/refs".
159+
# This is not possible with protocol v2, since both objects and refs
160+
# are obtained from the "git-upload-pack" path. A solution to this is
161+
# to teach the server and client to be able to inline ls-refs requests
162+
# as an Extra Parameter (see pack-protocol.txt), so that "info/refs"
163+
# can serve refs, just like it does in protocol v0.
164+
GIT_TEST_PROTOCOL_VERSION=0 git --git-dir=half-auth fetch &&
155165
expect_askpass none
156166
'
157167

0 commit comments

Comments
 (0)