From patchwork Mon Feb 25 21:54:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94EEC1575 for ; Mon, 25 Feb 2019 21:54:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84DC226B39 for ; Mon, 25 Feb 2019 21:54:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7907027EED; Mon, 25 Feb 2019 21:54:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3ADA26B39 for ; Mon, 25 Feb 2019 21:54:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729850AbfBYVyW (ORCPT ); Mon, 25 Feb 2019 16:54:22 -0500 Received: from mail-qt1-f201.google.com ([209.85.160.201]:46619 "EHLO mail-qt1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728940AbfBYVyV (ORCPT ); Mon, 25 Feb 2019 16:54:21 -0500 Received: by mail-qt1-f201.google.com with SMTP id r24so10566839qtj.13 for ; Mon, 25 Feb 2019 13:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=B/NA90jRu3+C+k1VoKgh5ggzgW2QMKfjvPMG/YAB52o=; b=ceTMh0Ya80xZLR8BX7Xy40eT4MvpDsJ56J34e9t6T436p4ftKSId2z4k+BrsTa2ETy QW/QIu+IOPR1Eya7+ASYGDOGFVJpD+uEDWnAFv2Gbdp2EhPczejFyQVkWyDALK62Fecf kyaeyNE1p1OtJVGCqgcjgEWLn5vDUgJphGz8eBT26iUcryRe1bC8OUQlzyOBfx5gscA5 Jd8R9Ps7iXXCe4tS69wu9UpVOtXeErUwI/rHEdIpCup+MEO7Td8p4J/SixEkewW2vJXB 1aUhb9mXZ48QO0ZcJlpscsuwi9wxz/bH+Gx/mlsXq4ylUC1qniT5KLeuz9z5JlAO5St/ Igzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=B/NA90jRu3+C+k1VoKgh5ggzgW2QMKfjvPMG/YAB52o=; b=ev30CCi71TGpVsFBn3iUuuh6wSsJZL2gYoOAvLlyeN4xPMUaTXrzpzuV9esr12kk7j R0xD3V+X6r8Xr17tmeRLmYfSQyefLTo7L4DSWIRFrFhmXBryo2K7tuR1alfr3CNPi7N6 LuQoxPnQTLTUTiYuZMJpGH9tdRD4Xus4Hv2es0AH4N80RjLK7SJnkFxUu8qeJftvfl3p AL2x6alXI94ADu+28zAYG5Bz2Bf6WvkksLbfxoEjkf+jyW7uOLqVSIFn7SOzSisOJ2pM L+d1iGNo0b0Nq3MFGFLo+k/0VOkMuaI8218LjSXuEBV5zey0HGrjNzZBs31FWy62x9wV 3pnw== X-Gm-Message-State: AHQUAuY1yp8u/lKh0fck73YzIibrW3HI6tR8Pu3MNS7FYShO0Jw56bJE 6LtmUq+NrP8y5qT8IKO5UFzYKFsz3dSQQsN9o4QVZARLn+yYTIB9pWW/cOT+2YU6iqDNboNLK4J 5ioUYFOzd7MYgxV6eEguYAgDz0yD5eDHiajVFS8Rp2lCv0law9Q2FGDrBbZBK8ry7yUJQ1XwXyL E3 X-Google-Smtp-Source: AHgI3Ib+7nXfhFJEMfXNNTLGSIvMn/ZE3tit1Vfbe8gC/dnXT49UfkNvLsfaRouTom/3c+U3v1RPs9WcvkgiNgDLYCAj X-Received: by 2002:a37:9a4c:: with SMTP id c73mr12149836qke.50.1551131660306; Mon, 25 Feb 2019 13:54:20 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:06 -0800 In-Reply-To: Message-Id: <4dcd89881317eb97886e1ba0377ae6fff4edc1da.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 1/8] tests: define GIT_TEST_PROTOCOL_VERSION From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Define a GIT_TEST_PROTOCOL_VERSION environment variable meant to be used from tests. When set, this ensures protocol.version is at least the given value, allowing the entire test suite to be run as if this configuration is in place for all repositories. As of this patch, all tests pass whether GIT_TEST_PROTOCOL_VERSION is unset or set to 0. Some tests fail when GIT_TEST_PROTOCOL_VERSION is set to 1 or 2, but this will be dealt with in subsequent patches. This is based on work by Ævar Arnfjörð Bjarmason. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- protocol.c | 17 +++++++++++++++-- t/README | 3 +++ t/t5400-send-pack.sh | 2 +- t/t5551-http-fetch-smart.sh | 3 ++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/protocol.c b/protocol.c index 5e636785d1..9741f05750 100644 --- a/protocol.c +++ b/protocol.c @@ -17,6 +17,10 @@ static enum protocol_version parse_protocol_version(const char *value) enum protocol_version get_protocol_version_config(void) { const char *value; + enum protocol_version retval = protocol_v0; + const char *git_test_k = "GIT_TEST_PROTOCOL_VERSION"; + const char *git_test_v = getenv(git_test_k); + if (!git_config_get_string_const("protocol.version", &value)) { enum protocol_version version = parse_protocol_version(value); @@ -24,10 +28,19 @@ enum protocol_version get_protocol_version_config(void) die("unknown value for config 'protocol.version': %s", value); - return version; + retval = version; + } + + if (git_test_v && *git_test_v) { + enum protocol_version env = parse_protocol_version(git_test_v); + + if (env == protocol_unknown_version) + die("unknown value for %s: %s", git_test_k, git_test_v); + if (retval < env) + retval = env; } - return protocol_v0; + return retval; } enum protocol_version determine_protocol_version_server(void) diff --git a/t/README b/t/README index 886bbec5bc..3125bfa6b6 100644 --- a/t/README +++ b/t/README @@ -341,6 +341,9 @@ marked strings" in po/README for details. GIT_TEST_SPLIT_INDEX= forces split-index mode on the whole test suite. Accept any boolean values that are accepted by git-config. +GIT_TEST_PROTOCOL_VERSION=, when set, overrides the +'protocol.version' setting to n if it is less than n. + GIT_TEST_FULL_IN_PACK_ARRAY= exercises the uncommon pack-objects code path where there are more than 1024 packs even if the actual number of packs in repository is below this limit. Accept diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index f1932ea431..571d620aed 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -288,7 +288,7 @@ test_expect_success 'receive-pack de-dupes .have lines' ' $shared .have EOF - GIT_TRACE_PACKET=$(pwd)/trace \ + GIT_TRACE_PACKET=$(pwd)/trace GIT_TEST_PROTOCOL_VERSION= \ git push \ --receive-pack="unset GIT_TRACE_PACKET; git-receive-pack" \ fork HEAD:foo && diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index ba83e567e5..a852684e16 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -43,7 +43,8 @@ test_expect_success 'clone http repository' ' < Cache-Control: no-cache, max-age=0, must-revalidate < Content-Type: application/x-git-upload-pack-result EOF - GIT_TRACE_CURL=true git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err && + GIT_TRACE_CURL=true GIT_TEST_PROTOCOL_VERSION= \ + git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err && test_cmp file clone/file && tr '\''\015'\'' Q X-Patchwork-Id: 10829179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95A0E17E9 for ; Mon, 25 Feb 2019 21:54:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 866982BD9F for ; Mon, 25 Feb 2019 21:54:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79FA42BE54; Mon, 25 Feb 2019 21:54:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9692BD9F for ; Mon, 25 Feb 2019 21:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729389AbfBYVyZ (ORCPT ); Mon, 25 Feb 2019 16:54:25 -0500 Received: from mail-qt1-f202.google.com ([209.85.160.202]:54908 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728884AbfBYVyY (ORCPT ); Mon, 25 Feb 2019 16:54:24 -0500 Received: by mail-qt1-f202.google.com with SMTP id j22so10437327qtq.21 for ; Mon, 25 Feb 2019 13:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=j12g4PkfMhum5AXx1xOCQwmkmFG+sCbcsnNprL6mqK0=; b=s0D08Vl86htk4aPMcZ6qSnx1FLhg/g8gtfaESB90BYbRXLutQTggGLCkhPv+i6NtiI 2iVjLMIwFyX3EGQ4TLhRO/5/NBuODBdjzARO6rMuCbujjww69UVWH9RVVGdVY/5u6TzI bkoSLr2Xkuxrc88DY3sM98VAjBReeYMm0mb22m9wwPpA3yoToZ24clBgfch5+GKi7rrm HJ+08LQbnvmd+Cyouw76OCCpYdcnJPQnuH4DDluACpqiaZAOJROuoR4rFszQXZQmKLpP 8CpXu0Xz6PhTWlomf3BILfxbVC6xCbRKXOhl67mVt3MX36mPCgF5vgZt1safo+qZtlZ4 089Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=j12g4PkfMhum5AXx1xOCQwmkmFG+sCbcsnNprL6mqK0=; b=q3VgUa+WRALEdQrRQjgSrckGGqyVm1lzfFM3WjoRisQU55yRP7h3cLRhfCgd+/GXZn UkYik/Ut7DQekuVk3rECyffw7iVHVfYWSctFvq+FD2dm81+dLIinCyHHWWPfWCZeax2Y nXjZNqyu5DHw+YxO6KWKwHQ+QEze/Q/ZC62aNt1F3XAG2DNrzoSapA7nr8oKim4TMh7z ZUHl0XyBfG+DqpCqc8NYquwY0f5VafyfQXiMuJs6IpN3Anm0OhmaxO+qRxyYHgiIhOcl 45ryv30jN9pTdFGGZOF3SnNWyNQQh5gEY/MNktb0bdGzuffPPV6W43pWpoeolzFEZcNv KbrQ== X-Gm-Message-State: AHQUAuYz0Km7p+Ror7PqHJ6uMc22lTOgJoyuuzIcRg6ZnKtK/LFjouTf 9W9ATqaewUrAAFb+xvaDG8Cl3D+gZHlQsgmMtzF1sx29TfJLCQJKuaOVsdnmLWoyCIBHCLI6ozq XTHqo8xvSI+Py9ophtkOV//a4q2lmToqwWg1Etvrw+vLv+IoM3s4biHfPSIocgBJTPwZAnO6ZH4 oe X-Google-Smtp-Source: AHgI3IakiAXVSi1jkRgSbTWSFzU7UKjhRuZY0DOeue0+THNZoJ+g9ZqWm8PbMuHHlC4BL5U2Zjr4rVsVxt70kr/UHhRo X-Received: by 2002:a0c:b7a8:: with SMTP id l40mr12362211qve.4.1551131662910; Mon, 25 Feb 2019 13:54:22 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:07 -0800 In-Reply-To: Message-Id: <1c865e4ae91d207160f8d41607ceca6d8ca7d775.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 2/8] t5601: check ssh command only with protocol v0 From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When running the SSH command as part of a fetch, Git will write "SendEnv GIT_PROTOCOL" as an option if protocol v1 or v2 is used, but not v0. Update all tests that check this to run Git with GIT_TEST_PROTOCOL_VERSION=0. I chose not to do a more thorough fix (for example, checking the value of GIT_TEST_PROTOCOL_VERSION to see if the SendEnv check needs to be done) because a set of patches [1] that unifies the handling of SSH options, including writing "SendEnv GIT_PROTOCOL" regardless of protocol version, is in progress. When that is done, this patch should be reverted, since the functionality in here is no longer needed. As of this patch, all tests pass if GIT_TEST_PROTOCOL_VERSION is set to 1. [1] https://public-inbox.org/git/cover.1545342797.git.steadmon@google.com/ Signed-off-by: Jonathan Tan --- t/t5601-clone.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index d6948cbdab..a454b143ea 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -345,7 +345,7 @@ expect_ssh () { } test_expect_success 'clone myhost:src uses ssh' ' - git clone myhost:src ssh-clone && + GIT_TEST_PROTOCOL_VERSION=0 git clone myhost:src ssh-clone && expect_ssh myhost src ' @@ -356,12 +356,12 @@ test_expect_success !MINGW,!CYGWIN 'clone local path foo:bar' ' ' test_expect_success 'bracketed hostnames are still ssh' ' - git clone "[myhost:123]:src" ssh-bracket-clone && + GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone && expect_ssh "-p 123" myhost src ' test_expect_success 'OpenSSH variant passes -4' ' - git clone -4 "[myhost:123]:src" ssh-ipv4-clone && + GIT_TEST_PROTOCOL_VERSION=0 git clone -4 "[myhost:123]:src" ssh-ipv4-clone && expect_ssh "-4 -p 123" myhost src ' @@ -405,7 +405,7 @@ test_expect_success 'OpenSSH-like uplink is treated as ssh' ' test_when_finished "rm -f \"\$TRASH_DIRECTORY/uplink\"" && GIT_SSH="$TRASH_DIRECTORY/uplink" && test_when_finished "GIT_SSH=\"\$TRASH_DIRECTORY/ssh\$X\"" && - git clone "[myhost:123]:src" ssh-bracket-clone-sshlike-uplink && + GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone-sshlike-uplink && expect_ssh "-p 123" myhost src ' @@ -444,14 +444,14 @@ test_expect_success 'single quoted plink.exe in GIT_SSH_COMMAND' ' test_expect_success 'GIT_SSH_VARIANT overrides plink detection' ' copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" && - GIT_SSH_VARIANT=ssh \ - git clone "[myhost:123]:src" ssh-bracket-clone-variant-1 && + GIT_TEST_PROTOCOL_VERSION=0 GIT_SSH_VARIANT=ssh \ + git clone "[myhost:123]:src" ssh-bracket-clone-variant-1 && expect_ssh "-p 123" myhost src ' test_expect_success 'ssh.variant overrides plink detection' ' copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" && - git -c ssh.variant=ssh \ + GIT_TEST_PROTOCOL_VERSION=0 git -c ssh.variant=ssh \ clone "[myhost:123]:src" ssh-bracket-clone-variant-2 && expect_ssh "-p 123" myhost src ' @@ -482,7 +482,7 @@ counter=0 # $3 path test_clone_url () { counter=$(($counter + 1)) - test_might_fail git clone "$1" tmp$counter && + test_might_fail env GIT_TEST_PROTOCOL_VERSION=0 git clone "$1" tmp$counter && shift && expect_ssh "$@" } From patchwork Mon Feb 25 21:54:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4CBEE17E9 for ; Mon, 25 Feb 2019 21:54:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39A412BD9F for ; Mon, 25 Feb 2019 21:54:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B2E52BE54; Mon, 25 Feb 2019 21:54:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 985BC2BD9F for ; Mon, 25 Feb 2019 21:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbfBYVy2 (ORCPT ); Mon, 25 Feb 2019 16:54:28 -0500 Received: from mail-ot1-f73.google.com ([209.85.210.73]:33377 "EHLO mail-ot1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729827AbfBYVy0 (ORCPT ); Mon, 25 Feb 2019 16:54:26 -0500 Received: by mail-ot1-f73.google.com with SMTP id e25so5680024otp.0 for ; Mon, 25 Feb 2019 13:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=v0z5HsQ6sVSwduN28MRdgbHtAkcKr34agxgiNpUctpk=; b=nZ9MFBSh9bv5L2eNRtAIkDjtkOJLZiMkL8GGWcnUuTfXsHjXbmhn682a/b8Ueg3h4L UaoheRcWoJ/vl2Ig62wfVkoxBaEsZGqhDkEYo8xBr3jcldNAdLIjEgfLOJzgNJsAI3K5 pgI/BKhN8/2qxDgTRAHeCB5LnyUNl6qgyBI9NeEPBSrv8R91Xm012LS47VV2mM3rujJ4 3hgiuYZCOb2LAjOtj5IcojoURSdyqx0mb6C0I6DVIoUtRynP5AJUfp0YzqviqkCy6eDu RZWRWHSlIj1tL3mKt3B1LTtJZOR/nMoK3SDRmdMuMgryBNr3QXuhBBjIY0uXMx8Esg81 WfDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=v0z5HsQ6sVSwduN28MRdgbHtAkcKr34agxgiNpUctpk=; b=Dlm739AZBc+9pawDd9yAd4pS3Ymo6MJOcbRWLpSQS8a9+eEzOZar+8YuMjGnYtOOEx VW8ONdN9z6DlefjWgOBc5HicY1VGUj3jbblFkJ7mo4DrrYBp6igcbXuqFGqlr2LrR2Lr luPvNVA4fanJ0EmGEgDhRPimanF2r31c0DGlVTPYsExe+E6+NlDXoau+4AsxCrwUYl2E 1GyRM9NRSqXZ0KpFrAtWwXJbsN1FYYTQtYWDESLAdpyPcsyfv5jPdBILORVfgiQNXcFc 69vv+IDS6/BKdSQyNoWE9LySuVjO++KalT1gFWOc2Tq9j2Lfl6r4+gyCQhs86FtlDGE3 1d6w== X-Gm-Message-State: AHQUAua9/Ec6JZfNCF1KbQ1zycQ+5YBNKLDP9JFSbAMQmuxU8JOsYGAW drSZi0ddhgM0Fl4bsG3aIo9uUuPynJJId9dq0rIwMB0kdvgiQvYvq2cJGqhr/ZsqjfMNXo6w5Om 6412Hm5edZQ35Jps7qEWqojcl3AYxr+zo639hb7u1BrFb55LQeLptByroYEXqeM9BbzAHlZeiPv Hy X-Google-Smtp-Source: AHgI3IbOBZVMYBrdmwuUgNa4fqnXXpgKus18yooQLTWQohRlmoBTecTxCfaEb1IQcC2ARUI+tjS+AeBK0jYFCKAWPrH9 X-Received: by 2002:a9d:635a:: with SMTP id y26mr12514635otk.53.1551131665383; Mon, 25 Feb 2019 13:54:25 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:08 -0800 In-Reply-To: Message-Id: <227a88aa8ca40663700b434284d3fa3876464dc8.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 3/8] tests: always test fetch of unreachable with v0 From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some tests check that fetching an unreachable object fails, but protocol v2 allows such fetches. Unset GIT_TEST_PROTOCOL_VERSION so that these tests are always run using protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5500-fetch-pack.sh | 4 +++- t/t5516-fetch-push.sh | 22 +++++++++++++++++----- t/t5551-http-fetch-smart.sh | 10 ++++++++-- t/t7406-submodule-update.sh | 5 ++++- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 49c540b1e1..0ef4d6f20c 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -636,7 +636,9 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 that is not advertised a test_commit -C server 6 && git init client && - test_must_fail git -C client fetch-pack ../server \ + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail env GIT_TEST_PROTOCOL_VERSION= git -C client fetch-pack ../server \ $(git -C server rev-parse refs/heads/master^) 2>err && test_i18ngrep "Server does not allow request for unadvertised object" err ' diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 37e8e80893..4bfbb79654 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -1147,8 +1147,12 @@ test_expect_success 'fetch exact SHA1' ' git prune && test_must_fail git cat-file -t $the_commit && + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + # fetching the hidden object should fail by default - test_must_fail git fetch -v ../testrepo $the_commit:refs/heads/copy 2>err && + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ + git fetch -v ../testrepo $the_commit:refs/heads/copy 2>err && test_i18ngrep "Server does not allow request for unadvertised object" err && test_must_fail git rev-parse --verify refs/heads/copy && @@ -1204,7 +1208,10 @@ do mk_empty shallow && ( cd shallow && - test_must_fail git fetch --depth=1 ../testrepo/.git $SHA1 && + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ + git fetch --depth=1 ../testrepo/.git $SHA1 && git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true && git fetch --depth=1 ../testrepo/.git $SHA1 && git cat-file commit $SHA1 @@ -1232,15 +1239,20 @@ do mk_empty shallow && ( cd shallow && - test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_3 && - test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_1 && + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail ok=sigpipe env GIT_TEST_PROTOCOL_VERSION= \ + git fetch ../testrepo/.git $SHA1_3 && + test_must_fail ok=sigpipe env GIT_TEST_PROTOCOL_VERSION= \ + git fetch ../testrepo/.git $SHA1_1 && git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true && git fetch ../testrepo/.git $SHA1_1 && git cat-file commit $SHA1_1 && test_must_fail git cat-file commit $SHA1_2 && git fetch ../testrepo/.git $SHA1_2 && git cat-file commit $SHA1_2 && - test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_3 + test_must_fail ok=sigpipe env GIT_TEST_PROTOCOL_VERSION= \ + git fetch ../testrepo/.git $SHA1_3 ) ' done diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index a852684e16..f02ae3b797 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -307,7 +307,10 @@ test_expect_success 'test allowreachablesha1inwant with unreachable' ' git init --bare test_reachable.git && git -C test_reachable.git remote add origin "$HTTPD_URL/smart/repo.git" && - test_must_fail git -C test_reachable.git fetch origin "$(git rev-parse HEAD)" + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ + git -C test_reachable.git fetch origin "$(git rev-parse HEAD)" ' test_expect_success 'test allowanysha1inwant with unreachable' ' @@ -326,7 +329,10 @@ test_expect_success 'test allowanysha1inwant with unreachable' ' git init --bare test_reachable.git && git -C test_reachable.git remote add origin "$HTTPD_URL/smart/repo.git" && - test_must_fail git -C test_reachable.git fetch origin "$(git rev-parse HEAD)" && + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ + git -C test_reachable.git fetch origin "$(git rev-parse HEAD)" && git -C "$server" config uploadpack.allowanysha1inwant 1 && git -C test_reachable.git fetch origin "$(git rev-parse HEAD)" diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index e87164aa8f..c973278300 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -943,7 +943,10 @@ test_expect_success 'submodule update clone shallow submodule outside of depth' cd super3 && sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp && mv -f .gitmodules.tmp .gitmodules && - test_must_fail git submodule update --init --depth=1 2>actual && + # Some protocol versions (e.g. 2) support fetching + # unadvertised objects, so restrict this test to v0. + test_must_fail env GIT_TEST_PROTOCOL_VERSION= \ + git submodule update --init --depth=1 2>actual && test_i18ngrep "Direct fetching of that commit failed." actual && git -C ../submodule config uploadpack.allowReachableSHA1InWant true && git submodule update --init --depth=1 >actual && From patchwork Mon Feb 25 21:54:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 511071575 for ; Mon, 25 Feb 2019 21:54:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4225D2B60E for ; Mon, 25 Feb 2019 21:54:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 366612BE50; Mon, 25 Feb 2019 21:54:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD5672B60E for ; Mon, 25 Feb 2019 21:54:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730068AbfBYVy3 (ORCPT ); Mon, 25 Feb 2019 16:54:29 -0500 Received: from mail-pg1-f202.google.com ([209.85.215.202]:37572 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729773AbfBYVy2 (ORCPT ); Mon, 25 Feb 2019 16:54:28 -0500 Received: by mail-pg1-f202.google.com with SMTP id a6so8020163pgj.4 for ; Mon, 25 Feb 2019 13:54:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=wIWQj1ERu5ZQ4vQcGP8vETcHT/HJ+SgmJQiINVtQ6u4=; b=ZQyhtBBxJjRYRJz62frDrSL0MkXVazzUOTZl4W1PGG0ktq4+acYF1TojhDCuaUv3Bv O/YY6rAP84S36NkYpLmJl2UeIrDCPx/02DTEVxqMkSpdWh+atfUgro74K9+jLRTmYNhP RaCPJ/g9AfroyedYX05panBf39CfqzTqlOt+dF0KdmngZPuqciGYUQk4FiU5XyxokQN2 Lni31vmwjjLtJqyXxf3211kemtKMpPYerCgi07CYhgTWoeARI2i2O77izGTNtlL0ByET nlwRmDfMNi2Omy0zi8/gPTIqa4cbQDEssd+dCxhXT+0xB0PkzvoF9UDA1ZmuAyMR9Ug+ FDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=wIWQj1ERu5ZQ4vQcGP8vETcHT/HJ+SgmJQiINVtQ6u4=; b=n0xo6+XDcDGNEvHTOuOxL8yFblxEP7G5JDhqOcH5Xtg6lOzBsMyp6P6Lc8q2S0O2M0 rjCDGV3wU6VnKnjQJOh9DtmXGVqTmhoy96ZGSyCRwfdAnNA3pQ7aNFnsuA14mmGCdnP+ 9RGozw8nLq47/7kbvhtRZz14Jr7c0WmWKe1WI0O4+BZx73nBRaAO32USrp3qJ3ipairW DVyYkG53ol1+3fetlZytO9IFv4CjSqrEdlyna/Q9MEznPgSrYY5LXgyCOZH7Sa1wu+yE iKQLjXtpvbRtY1vyu3ciu8AJ13HkVgUeGcshz1aCx88OA+Z93kIaAcU5GAZv32DJJ78W NsTA== X-Gm-Message-State: AHQUAua9R4qlOCcj9xygVvEICbTSo2J4to7ZDnKlIrpCFKbcdF3tHLFP LJ+Y0xNj+Txfk/eQN9lZfGlOauZTYdeJkL7Uv249BwOjs6naFv54OikKZWs5pTwxUxvFPXsi3rX kacFBOoyjWuTsVy8d4R/47dPEBOELh7xzuG1GW8IXQ0mJfZH22Kv9nVrWEKD8JzYMzIookarRmJ tj X-Google-Smtp-Source: AHgI3IZf2jFfXoakCyJrh1dzmbR9mPzKEjGiaLkwA30KdlP69uN8tgmKuCiiPsizrAwCM48VgA+C7napW2x6hoLn2fK5 X-Received: by 2002:a62:7553:: with SMTP id q80mr6632636pfc.17.1551131667643; Mon, 25 Feb 2019 13:54:27 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:09 -0800 In-Reply-To: Message-Id: <8f510c5c78dd5152307e30f8115188ad689b8c57.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 4/8] t5503: fix overspecification of trace expectation From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to extract the wants from a trace, a loop in t5503 currently breaks if "0000" is found. This works for protocol v0 and v1, but not v2. Instead, teach t5503 to look specifically for the "want" string, which is compatible with all protocols. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5503-tagfollow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5503-tagfollow.sh b/t/t5503-tagfollow.sh index 4ca48f0276..6041a4dd32 100755 --- a/t/t5503-tagfollow.sh +++ b/t/t5503-tagfollow.sh @@ -47,7 +47,7 @@ get_needs () { test -s "$1" && perl -alne ' next unless $F[1] eq "upload-pack<"; - last if $F[2] eq "0000"; + next unless $F[2] eq "want"; print $F[2], " ", $F[3]; ' "$1" } From patchwork Mon Feb 25 21:54:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 621C61575 for ; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538112B60E for ; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 481F02BE54; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEFA02B60E for ; Mon, 25 Feb 2019 21:54:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730952AbfBYVyf (ORCPT ); Mon, 25 Feb 2019 16:54:35 -0500 Received: from mail-io1-f74.google.com ([209.85.166.74]:49027 "EHLO mail-io1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729825AbfBYVyb (ORCPT ); Mon, 25 Feb 2019 16:54:31 -0500 Received: by mail-io1-f74.google.com with SMTP id w19so8931759ioa.15 for ; Mon, 25 Feb 2019 13:54:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=J5C1EnljrCL8OE94dJRxs7DjEMuSpRaDKmNnjUNlToQ=; b=kLnyvGN5ObqQFaC1qIZX8IQCYEqXij8PbuT8yy4yZ/u+09d+588aIeA16qUIMjbKiy N3hY22Zy+ro6eeEQuK6nV/xnaLa6mrWrDmGP6Z+4SSgovSp7PePvaEawMRDHH6I45xEy IDFLa69dqVt/fe1ssBU8SeejGUF6l8oPdGwuhxQ0VjzdLO8FgMeZ9RijStea+vvG1suH /cH554Tp5XtnPmjrXUutr5gpiq0duaJX5A2xRSMMbN/XF517+4Cwp9XJfam/D63JGDKr Mz31tBNTLFJAyOJfo7k/VIVDtJp6bfSSlooShEynv0uR8cV/9dw8313hbkzskVAWNlyO tsWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=J5C1EnljrCL8OE94dJRxs7DjEMuSpRaDKmNnjUNlToQ=; b=mT6X+auXfc3SbTET78txB01MJgCMwCHbzvl9KNuY2lIBEMYyqOqfZa6cbcqOtC9wJZ N45e39d5oCZeNsgGnFoOWJ0qS7SbTKpA145W/IV7zDBOvioV+t1o3QMPxsW6iJr2ES7n c+DSO618ySkYQislNKiyHSzQsnafcUt3Kh0/lUDFcslF37N6LOy2BzzEnDwzP9YgBTUk QtHNVw3RTNcDir5ZRQ6Mgcrom22TFXmR0ryG4hQa3MnIdQi/T+lqbXpe2lPctANiIoC+ MCdnk+oo9ghmAuYojrQ3lMuUY6YWmE50b4mFWLBxNZ7BXqgu55UFr7HViKBJygPH2VCX 9lqw== X-Gm-Message-State: APjAAAWhsHuVtPyKWzQvGsrha7uaL1mATiiBriGnd5yE5RxPwcwowzZM 3XmeyjS+TY9bPYpTRQ8CS1kzuas1vh8XpYkoElc60Qq0/T/PnMO73Zjd3mn5I1iXP1asc8fmRxp CbiuKjgY/oR/Pn3N4HEmzIe9JDf2GpwXp9rLRZRPYq79u02+M63XLKuQ5os2SeOSgAdQNEGxIzz Z4 X-Google-Smtp-Source: AHgI3IZmkKsHMM94PV1Ile0OS26v6UHEr0PFLpu91LmyOpObESV4hOaxkl+5soFiOxSmrBGAd4wqMrzaqb87EHjYObFl X-Received: by 2002:a24:6241:: with SMTP id d62mr595815itc.18.1551131670423; Mon, 25 Feb 2019 13:54:30 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:10 -0800 In-Reply-To: Message-Id: <9aaabdac523b22d781571516402fa63a2e81a0e9.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 5/8] t5512: compensate for v0 only sending HEAD symrefs From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Protocol v2 supports sending non-HEAD symrefs, but this is not true of protocol v0. Some tests expect protocol v0 behavior, so fix them to use protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5512-ls-remote.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index ced15ae122..e3c4a48c85 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -223,7 +223,9 @@ test_expect_success 'ls-remote --symref' ' $(git rev-parse refs/tags/mark1.10) refs/tags/mark1.10 $(git rev-parse refs/tags/mark1.2) refs/tags/mark1.2 EOF - git ls-remote --symref >actual && + # Protocol v2 supports sending symrefs for refs other than HEAD, so use + # protocol v0 here. + GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref >actual && test_cmp expect actual ' @@ -232,7 +234,9 @@ test_expect_success 'ls-remote with filtered symref (refname)' ' ref: refs/heads/master HEAD 1bd44cb9d13204b0fe1958db0082f5028a16eb3a HEAD EOF - git ls-remote --symref . HEAD >actual && + # Protocol v2 supports sending symrefs for refs other than HEAD, so use + # protocol v0 here. + GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . HEAD >actual && test_cmp expect actual ' @@ -243,7 +247,9 @@ test_expect_failure 'ls-remote with filtered symref (--heads)' ' 1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo 1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master EOF - git ls-remote --symref --heads . >actual && + # Protocol v2 supports sending symrefs for refs other than HEAD, so use + # protocol v0 here. + GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual && test_cmp expect actual ' @@ -252,9 +258,11 @@ test_expect_success 'ls-remote --symref omits filtered-out matches' ' 1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo 1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master EOF - git ls-remote --symref --heads . >actual && + # Protocol v2 supports sending symrefs for refs other than HEAD, so use + # protocol v0 here. + GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual && test_cmp expect actual && - git ls-remote --symref . "refs/heads/*" >actual && + GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . "refs/heads/*" >actual && test_cmp expect actual ' From patchwork Mon Feb 25 21:54:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BC421805 for ; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CCAD2B60E for ; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 715EA2BE50; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F6F42BD9F for ; Mon, 25 Feb 2019 21:54:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730345AbfBYVye (ORCPT ); Mon, 25 Feb 2019 16:54:34 -0500 Received: from mail-pl1-f202.google.com ([209.85.214.202]:37372 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729575AbfBYVyd (ORCPT ); Mon, 25 Feb 2019 16:54:33 -0500 Received: by mail-pl1-f202.google.com with SMTP id n1so4843745plk.4 for ; Mon, 25 Feb 2019 13:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=lZ+SU1g58+pIyK5R8rJgq7ty7fJwd6Ljlw/mFnvSHtE=; b=LL5rVzkOi0VqgWL1f1wp3lDQoCwurDXkeDS71JBgJ1/EIvst5DAFwDMBNmCKQ5jC5A XfBSM4fJMSCiL8HVbNIlaRr3nYD0nAMpIlSDiVJcnWEQwYEd7L8OpTdkZ7DGz7lrcsUx LEyripyqzYapmsnXVp9dpllpA6Q9k3LjgfkicpKLUifGeJmUSi3BeF0CCMFeAhDL3IsB iT46jqmz7cGUWRFhFIDBeJnf0ndzaZBydM79TMi/eFI8UTHbT7bR44AvPNqSGKqdCyIb Y4FE7aiHGxk8eo8DLYoK47rV4DxPK22dgpqVjSqCustS29X9WgM3HTJv5dGmEmqDyfhX u6gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=lZ+SU1g58+pIyK5R8rJgq7ty7fJwd6Ljlw/mFnvSHtE=; b=Ucxe5lOvh3XrR6en9Loj7kNFH3r6yXgOSEDrsdMwbuEbUkmb0jbyeAmWn22Zk56PTJ 0gzjSWVnEQcG1fx8BZj82eA/bi6pSf4cAnzmhaUiY/hn+ueMO1pzPdQ0Y5B3efbU6dim etzYesXx5THwN1dkW/aZaPFZnUnkSwgS3pxHRl9N4ic+DBjaouEvHpfFRhwmIiQuEtG2 winPv6KfNs8AKIp/a5VTuosMLIHhzQFvv2TvAvgdcw3CeZ4mFkoLcnGNfPnlX93MgcAO WbfY7YJtzNY3i33LYspz2HgTM7Mxnq226BTafdM09r3Iw+H75dsV1jlQII84K2+zfLBF l/Ug== X-Gm-Message-State: AHQUAuY01DJQ2aP1gTjyLDh3H0kP1Y8ObOBIxb7qGm1Xd/ksDzP4Qgnq p2cLsw2UQ/gTxzJ5tTLvhKCOtddNS8+QRuulaDr+2ZVqj9w+IXnnUXPnows8vFUP9FgQ4+VbbBu aOiAgAm9iTPKJgVZi3DcTETtM378RCFvuaQs0uKLqIQQokHWrUeI4KVs24wHKq9rvGmmN+I4BCK J/ X-Google-Smtp-Source: AHgI3Ibvlh73g92ZJ1AD3FN1J/lPlNnnrPTvx8+RS0vcI1y/ReYlhMFbAdljrypKNHdvINfzdRDTH3RwNSsQvnDDqk9a X-Received: by 2002:a63:5d1c:: with SMTP id r28mr7831840pgb.93.1551131672811; Mon, 25 Feb 2019 13:54:32 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:11 -0800 In-Reply-To: Message-Id: <6c29e64bc3b081b0974de3e0d5fb7b926b272eaa.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 6/8] t5700: only run with protocol version 1 From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5700-protocol-v1.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/t5700-protocol-v1.sh b/t/t5700-protocol-v1.sh index ba86a44eb1..d5ed196bfd 100755 --- a/t/t5700-protocol-v1.sh +++ b/t/t5700-protocol-v1.sh @@ -4,6 +4,9 @@ test_description='test git wire-protocol transition' TEST_NO_CREATE_REPO=1 +# This is a protocol-specific test. +GIT_TEST_PROTOCOL_VERSION= + . ./test-lib.sh # Test protocol v1 with 'git://' transport From patchwork Mon Feb 25 21:54:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8D9B1575 for ; Mon, 25 Feb 2019 21:54:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA7862BD9F for ; Mon, 25 Feb 2019 21:54:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EDF32BE50; Mon, 25 Feb 2019 21:54:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14B6A2B60E for ; Mon, 25 Feb 2019 21:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729938AbfBYVyi (ORCPT ); Mon, 25 Feb 2019 16:54:38 -0500 Received: from mail-qt1-f201.google.com ([209.85.160.201]:49431 "EHLO mail-qt1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729825AbfBYVyg (ORCPT ); Mon, 25 Feb 2019 16:54:36 -0500 Received: by mail-qt1-f201.google.com with SMTP id q11so10461768qtj.16 for ; Mon, 25 Feb 2019 13:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=eUnQqs898tMQR0DBFUV33IK8BdRkgyzOL1avYQsVMiE=; b=ZSY6SzgHu+XF672ZmwPsZjC+O01ZxBb5s0B01oMtzeSnY3bWwxQkfFP2PTc1EaTi5f FLsFk2Z/d7Z5akg+BP5ZBbb2BGS+YtDgFxhnrligwIUjnVLv8YGymnXCWGV41E1Tunoy j1MVa1sZoE4Awn2EAVdoLMxufoDNmnrS1FPqCNsp/qKPiE/jOF74gmmVYbnvqIVndsMX Wn/N5XPJhQq7Scw2vmJ7u209Q1BK/YHTjR6NweVTV6WML/17sVCWQ9AJxldZZJ0vKqES SJhMf6QxNZVUACD5Ae/uYTRH/D0/AyHqHUjkRvXbRbpFCsY8lHjH9TMzuAcB1aoilGR4 eNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=eUnQqs898tMQR0DBFUV33IK8BdRkgyzOL1avYQsVMiE=; b=ng6qM0glJv28eMeW3/Emt21kXIwUAgBzjnjGFdQO6wf3xcDklA/mkXP1vCDZQpX5in zmDWZNys3q7VlYznvQGdQo/bd8LCUTpmFZT4pp9tTZDrdQUkGK+6D54uu5ZzPREE95Jb g3cd25KAZnA1eAPJqc8cTrRkL5ORcBHBAlimmtDW5sR8j81oEuwoUw83lLyd4IJ3kpzb FszrwPbLZU7rdTfBIH/UJNSRPeYZPdm0E0ue+B2W5AUft6lZ2srXYobDF8YfRU3kiHpJ nXVOf1SPWbt0LGb+5/Ro6aPQ3Ctn45xQgeHz5XMKxtw5YSeP2xOoEfmUcNs6PiDa4hp+ 4ArQ== X-Gm-Message-State: AHQUAuZJCGURszzS0mFhMnCiR3nH6zUAI+yBvz9CGxrc5onXDMeaVIPg UZiNZ/811M5OxuLmiECELxKGKCdMfkt1CBzhld+iqnXoodJnWEq+i0YEoSnektYuvH1uZhEXg7E ML/l9nrr3NhCx6FCgOA7JIRTQt4wEKDMY01Q2cd0RudSBfClFv8cL+AbXGyhnPuur2YxebpT+GT oB X-Google-Smtp-Source: AHgI3IYH4jigTl0U0+dpuoPvKZEtv6v2wH/rjZmaRcHVCyE9zRBGDPlObM3lL3Oq+DqT4L5cL3niNTV7/h0TC/Ejw6Y2 X-Received: by 2002:a37:444:: with SMTP id 65mr12181954qke.51.1551131675565; Mon, 25 Feb 2019 13:54:35 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:12 -0800 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 7/8] tests: fix protocol version for overspecifications From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These tests are also marked with a NEEDSWORK comment. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5515-fetch-merge-logic.sh | 4 ++++ t/t5539-fetch-http-shallow.sh | 5 ++++- t/t5541-http-push-smart.sh | 14 ++++++++++++-- t/t5551-http-fetch-smart.sh | 34 ++++++++++++++++++++++++++-------- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 36b0dbc01c..e55d8474ef 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -6,6 +6,10 @@ test_description='Merge logic in fetch' +# NEEDSWORK: If the overspecification of the expected result is reduced, we +# might be able to run this test in all protocol versions. +GIT_TEST_PROTOCOL_VERSION= + . ./test-lib.sh LF=' diff --git a/t/t5539-fetch-http-shallow.sh b/t/t5539-fetch-http-shallow.sh index 5fbf67c446..cdb687b93a 100755 --- a/t/t5539-fetch-http-shallow.sh +++ b/t/t5539-fetch-http-shallow.sh @@ -67,7 +67,10 @@ test_expect_success 'no shallow lines after receiving ACK ready' ' cd clone && git checkout --orphan newnew && test_commit new-too && - GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch --depth=2 && + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" GIT_TEST_PROTOCOL_VERSION= \ + git fetch --depth=2 && grep "fetch-pack< ACK .* ready" ../trace && ! grep "fetch-pack> done" ../trace ) diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 5475afc052..0e3055ab98 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -47,7 +47,12 @@ test_expect_success 'no empty path components' ' cd "$ROOT_PATH" && git clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone && - check_access_log exp + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + if test -z "$GIT_TEST_PROTOCOL_VERSION" + then + check_access_log exp + fi ' test_expect_success 'clone remote repository' ' @@ -128,7 +133,12 @@ GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200 POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200 EOF test_expect_success 'used receive-pack service' ' - check_access_log exp + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + if test -z "$GIT_TEST_PROTOCOL_VERSION" + then + check_access_log exp + fi ' test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \ diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index f02ae3b797..a685d3edb6 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -81,12 +81,18 @@ test_expect_success 'clone http repository' ' /^< Content-Length: /d /^< Transfer-Encoding: /d " >actual && - sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \ - actual >actual.smudged && - test_cmp exp actual.smudged && - grep "Accept-Encoding:.*gzip" actual >actual.gzip && - test_line_count = 2 actual.gzip + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + if test -z "$GIT_TEST_PROTOCOL_VERSION" + then + sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \ + actual >actual.smudged && + test_cmp exp actual.smudged && + + grep "Accept-Encoding:.*gzip" actual >actual.gzip && + test_line_count = 2 actual.gzip + fi ' test_expect_success 'fetch changes via http' ' @@ -104,7 +110,13 @@ test_expect_success 'used upload-pack service' ' GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200 POST /smart/repo.git/git-upload-pack HTTP/1.1 200 EOF - check_access_log exp + + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + if test -z "$GIT_TEST_PROTOCOL_VERSION" + then + check_access_log exp + fi ' test_expect_success 'follow redirects (301)' ' @@ -216,8 +228,14 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set git config http.cookiefile cookies.txt && git config http.savecookies true && git ls-remote $HTTPD_URL/smart_cookies/repo.git master && - tail -3 cookies.txt | sort >cookies_tail.txt && - test_cmp expect_cookies.txt cookies_tail.txt + + # NEEDSWORK: If the overspecification of the expected result is reduced, we + # might be able to run this test in all protocol versions. + if test -z "$GIT_TEST_PROTOCOL_VERSION" + then + tail -3 cookies.txt | sort >cookies_tail.txt && + test_cmp expect_cookies.txt cookies_tail.txt + fi ' test_expect_success 'transfer.hiderefs works over smart-http' ' From patchwork Mon Feb 25 21:54:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Tan X-Patchwork-Id: 10829189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF4A61575 for ; Mon, 25 Feb 2019 21:54:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0D7C2BD9F for ; Mon, 25 Feb 2019 21:54:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C474C2BE54; Mon, 25 Feb 2019 21:54:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 771B62BD9F for ; Mon, 25 Feb 2019 21:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730955AbfBYVyj (ORCPT ); Mon, 25 Feb 2019 16:54:39 -0500 Received: from mail-qk1-f202.google.com ([209.85.222.202]:48328 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729943AbfBYVyi (ORCPT ); Mon, 25 Feb 2019 16:54:38 -0500 Received: by mail-qk1-f202.google.com with SMTP id z198so8955640qkb.15 for ; Mon, 25 Feb 2019 13:54:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Sd7OU0ZlQl3HmpVtm/ImInrB76Zk0Cn0aUyZfY/fuU8=; b=nVdzRv7vOKdOjhe5RHC8GjExyLNWj0VKy0fagAlMXlFpW9TN4kX3P9hNF34AOLf8BW OU9bnDoHe0cnX9myU1TESsFdN5FTVn7Iq6Du+LxsEHL0ijz3QIICzp+/sdewq6Gs1t1+ rqbGLqjHKw6DKc2DMHp9lJgLKHvP8uxnU88/iKRbzcHeW2haQHM+FZdOR6olBv5xrVMv q9tu5XthFdtfwu8ngTPjMvH1mC/KABjZ0zoJ8yDD3v3k/VsXgWEdyrmrBFRvUlX2LW+R QBQ+KDG2KzTRYID0pZlhM0bWAB4kgkSzu79focXFb2PTmJW+zlsHUUEjwOioAGxs+jtK b2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Sd7OU0ZlQl3HmpVtm/ImInrB76Zk0Cn0aUyZfY/fuU8=; b=WV2uTF4fb3X3xb3JHDMpe08w9NAWTODDMRlVqR5y/p7Gc/qRVy/lkxCbl2Bq0vpeFK cog0PQ5eJnOIxlBv2VxEGtDPSe7nqTOJsYfo5b/Xus8SWFa7bKGzcyiwb+k1fSEasB3w TyWl4+3y2e3gw4cs/faGcSOtqvK/ZbELziL5KO62VuKA4bAaGCHWPuXNe4uDDZlbtXUy Bu/0/LSN7Ej4fdxcvuuAMHAdmZWYablkSUFHOTZiawJjF2ayyvfDToz4K3tXuBD+PCYs KMcwiR+nk5Mqp6CEkM873sR7lNeobwOhzwVbcGNuK6wL/BixPgm+tLKVxYn/SBApKtHA Gl9Q== X-Gm-Message-State: AHQUAuaEgAnH2HjRqIr3hmm3XBwemLkWrEaxyNVEC7UFqhMHSCev4/SO vsdbh8eoZw+RVD6xG6VxvKa6KcdtLAS5DxPDSSEqpVfODX9hr7Ea1nfha7KlqhgzcjIJ4lIqhbS gZRRdT1vZD3qcBw23fxmjKkm+0IdXUfISygVC5PfuROfcf5NdiUikeK+lnUwbLqrIvQorYKr8s2 lq X-Google-Smtp-Source: AHgI3Ib0dV5mopdx4l1TafB3+hrQUHmjUIafdiMW015yMWrgpRRZfddY5Rwb4pyBwbqppfiLK+BmBKPvqJRSdNN5cuXv X-Received: by 2002:a05:620a:144e:: with SMTP id i14mr7217159qkl.38.1551131677943; Mon, 25 Feb 2019 13:54:37 -0800 (PST) Date: Mon, 25 Feb 2019 13:54:13 -0800 In-Reply-To: Message-Id: <629a243c7f53cfb01f7fec060db318f650ad33d3.1551131153.git.jonathantanmy@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.19.0.271.gfe8321ec05.dirty Subject: [PATCH 8/8] t5552: compensate for v2 filtering ref adv. From: Jonathan Tan To: git@vger.kernel.org Cc: Jonathan Tan , peff@peff.net, Junio C Hamano Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Protocol v2 filters the ref advertisement, but protocol v0 does not. A test in t5552 uses the ref advertisement, so fix it to use protocol v0. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- t/t5552-skipping-fetch-negotiator.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t5552-skipping-fetch-negotiator.sh b/t/t5552-skipping-fetch-negotiator.sh index 30857b84a8..8a14be51a1 100755 --- a/t/t5552-skipping-fetch-negotiator.sh +++ b/t/t5552-skipping-fetch-negotiator.sh @@ -127,7 +127,10 @@ test_expect_success 'use ref advertisement to filter out commits' ' # not need to send any ancestors of "c3", but we still need to send "c3" # itself. test_config -C client fetch.negotiationalgorithm skipping && - trace_fetch client origin to_fetch && + + # The ref advertisement itself is filtered when protocol v2 is used, so + # use v0. + GIT_TEST_PROTOCOL_VERSION= trace_fetch client origin to_fetch && have_sent c5 c4^ c2side && have_not_sent c4 c4^^ c4^^^ '