aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-23 05:49:47 -0500
committerJunio C Hamano <gitster@pobox.com>2023-02-23 13:01:14 -0800
commit77fb36aa7eba5161c34dbe70ba4dd5449e079c87 (patch)
treee5f7879df8516c68e104903ab7aa3c6d8c45c666 /builtin/commit-graph.c
parentPrepare for 2.39.3 just in case (diff)
downloadgit-77fb36aa7eba5161c34dbe70ba4dd5449e079c87.tar.gz
git-77fb36aa7eba5161c34dbe70ba4dd5449e079c87.zip
t5541: run "used receive-pack service" test earlier
There's a test in t5541 that confirms that "git push" makes two requests (a GET to /info/refs, and a POST to /git-receive-pack). However, it's a noop unless GIT_TEST_PROTOCOL_VERSION is set to "0", due to 8a1b0978ab (test: request GIT_TEST_PROTOCOL_VERSION=0 when appropriate, 2019-12-23). This means that almost nobody runs it. And indeed, it has been broken since b0c4adcdd7 (remote-curl: send Accept-Language header to server, 2022-07-11). But the fault is not in that commit, but in how brittle the test is. It runs after several operations have been performed, which means that it expects to see the complete set of requests made so far in the script. Commit b0c4adcdd7 added a new test, which means that the "used receive-pack service" test must be updated, too. Let's fix this by making the test less brittle. We'll move it higher in the script, right after the first push has completed. And we'll clear the access log right before doing the push, so we'll see only the requests from that command. This is technically testing less, in that we won't check that all of those other requests also correctly used smart http. But there's no particular reason think that if the first one did, the others wouldn't. After this patch, running: GIT_TEST_PROTOCOL_VERSION=0 ./t5541-http-push-smart.sh passes, whereas it did not before. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions