Signed-off-by: Teng Long <dyroneteng@xxxxxxxxx> --- t/t5702-protocol-v2.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh index 5ad52e0cee..09683ebfdc 100755 --- a/t/t5702-protocol-v2.sh +++ b/t/t5702-protocol-v2.sh @@ -1142,6 +1142,24 @@ test_expect_success 'commit-exclusion: part of packfile response provided as URI http_child/.git/objects/pack/*.idx >filelist && test_line_count = 4 filelist ' +test_expect_success 'tag-exclusion: part of packfile response provided as URI' ' + P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" && + test_when_finished "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 && + test_commit -C "$P" A && + git -C "$P" tag -a -m "annotated_tag" tagA && + tagObj=$(git -C "$P" rev-parse tagA) && + configure_exclusion tag "$P" "$tagObj" >h2 && + git init http_child && + GIT_TRACE=1 GIT_TRACE_PACKET=`pwd`/log GIT_TEST_SIDEBAND_ALL=1 \ + git -C http_child \ + -c protocol.version=2 \ + -c fetch.uriprotocols=http,https \ + fetch --tags "$HTTPD_URL/smart/http_parent" +' test_expect_success 'fetching with valid packfile URI but invalid hash fails' ' P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" && -- 2.31.1.456.gec51e24953