diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-08 16:04:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-08 16:04:47 -0800 |
commit | 6c46f864e5db7c88fdee1d67dcc20a4451a12ca2 (patch) | |
tree | 7e78dd9fe75257c8ceae42211477a711f09f1cd2 /t/t5702-protocol-v2.sh | |
parent | Merged the open-eintr workaround for macOS (diff) | |
parent | fetch-pack: do not mix --pack_header and packfile uri (diff) | |
download | tgif-6c46f864e5db7c88fdee1d67dcc20a4451a12ca2.tar.xz |
Merge branch 'jt/transfer-fsck-across-packs-fix'
The code to fsck objects received across multiple packs during a
single git fetch session has been broken when the packfile URI
feature was in use. A workaround has been added by disabling the
codepath to avoid keeping a packfile that is too small.
* jt/transfer-fsck-across-packs-fix:
fetch-pack: do not mix --pack_header and packfile uri
Diffstat (limited to 't/t5702-protocol-v2.sh')
-rwxr-xr-x | t/t5702-protocol-v2.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh index 994a76ca3c..2e1243ca40 100755 --- a/t/t5702-protocol-v2.sh +++ b/t/t5702-protocol-v2.sh @@ -881,6 +881,27 @@ test_expect_success 'part of packfile response provided as URI' ' test_line_count = 6 filelist ' +test_expect_success 'packfile URIs with fetch instead of clone' ' + P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" && + rm -rf "$P" http_child log && + + git init "$P" && + git -C "$P" config "uploadpack.allowsidebandall" "true" && + + echo my-blob >"$P/my-blob" && + git -C "$P" add my-blob && + git -C "$P" commit -m x && + + configure_exclusion "$P" my-blob >h && + + git init http_child && + + GIT_TEST_SIDEBAND_ALL=1 \ + git -C http_child -c protocol.version=2 \ + -c fetch.uriprotocols=http,https \ + fetch "$HTTPD_URL/smart/http_parent" +' + test_expect_success 'fetching with valid packfile URI but invalid hash fails' ' P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" && rm -rf "$P" http_child log && |