diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-29 15:43:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-29 15:43:12 -0700 |
commit | 735907bde1de71e2fc90712bdb3bf30fc417a8ac (patch) | |
tree | 0d1b59285e312d72caecd9a2183cb42a0d841321 /t/t5541-http-push-smart.sh | |
parent | 8ba651b56e5916d864b2a5c4cce8d4e445b87e17 (diff) | |
parent | c5c3486f38af50e3d63b3bd1d1d25773e4f4420a (diff) | |
download | git-735907bde1de71e2fc90712bdb3bf30fc417a8ac.tar.gz |
Merge branch 'jk/http-push-status-fix'
"git push" client talking to an HTTP server did not diagnose the
lack of the final status report from the other side correctly,
which has been corrected.
* jk/http-push-status-fix:
transport-helper: recognize "expecting report" error from send-pack
send-pack: complain about "expecting report" with --helper-status
Diffstat (limited to 't/t5541-http-push-smart.sh')
-rwxr-xr-x | t/t5541-http-push-smart.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index c024fa2818..8ca50f8b18 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -509,4 +509,20 @@ test_expect_success 'colorize errors/hints' ' test_i18ngrep ! "^hint: " decoded ' +test_expect_success 'report error server does not provide ref status' ' + git init "$HTTPD_DOCUMENT_ROOT_PATH/no_report" && + git -C "$HTTPD_DOCUMENT_ROOT_PATH/no_report" config http.receivepack true && + test_must_fail git push --porcelain \ + $HTTPD_URL_USER_PASS/smart/no_report \ + HEAD:refs/tags/will-fail >actual && + test_must_fail git -C "$HTTPD_DOCUMENT_ROOT_PATH/no_report" \ + rev-parse --verify refs/tags/will-fail && + cat >expect <<-EOF && + To $HTTPD_URL/smart/no_report + ! HEAD:refs/tags/will-fail [remote failure] (remote failed to report status) + Done + EOF + test_cmp expect actual +' + test_done |