summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-12-13 19:11:56 -0500
committerJunio C Hamano <gitster@pobox.com>2011-12-13 16:34:44 -0800
commita4ddbc33d7906f0e10c68c140a9a1003d9715a77 (patch)
treed5326b24cdb37c93c57763f8079f7b0f59061091 /t
parent0521710a8b9321751ca8768c3f7ea8895901e5c3 (diff)
downloadgit-a4ddbc33d7906f0e10c68c140a9a1003d9715a77.tar.gz
http-push: enable "proactive auth"jk/maint-push-over-dav
Before commit 986bbc08, git was proactive about asking for http passwords. It assumed that if you had a username in your URL, you would also want a password, and asked for it before making any http requests. However, this could interfere with the use of .netrc (see 986bbc08 for details). And it was also unnecessary, since the http fetching code had learned to recognize an HTTP 401 and prompt the user then. Furthermore, the proactive prompt could interfere with the usage of .netrc (see 986bbc08 for details). Unfortunately, the http push-over-DAV code never learned to recognize HTTP 401, and so was broken by this change. This patch does a quick fix of re-enabling the "proactive auth" strategy only for http-push, leaving the dumb http fetch and smart-http as-is. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5540-http-push.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 3300227796..1eea647656 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -160,7 +160,7 @@ test_expect_success 'PUT and MOVE sends object to URLs with SHA-1 hash suffix' '
test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
"$ROOT_PATH"/test_repo_clone master
-test_expect_failure 'push to password-protected repository (user in URL)' '
+test_expect_success 'push to password-protected repository (user in URL)' '
test_commit pw-user &&
git push "$HTTPD_URL_USER/auth/dumb/test_repo.git" HEAD &&
git rev-parse --verify HEAD >expect &&