All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: git@vger.kernel.org
Cc: Josh Steadmon <steadmon@google.com>,
	Jonathan Tan <jonathantanmy@google.com>
Subject: [PATCH] t5617,t7814: remove unnecessary 'uploadpack.allowanysha1inwant'
Date: Sat, 19 Feb 2022 12:30:10 -0500	[thread overview]
Message-ID: <20220219173010.2859-1-levraiphilippeblain@gmail.com> (raw)
In-Reply-To: <690d2316ad518ea4551821b2b3aa652996858475.1644034886.git.steadmon@google.com>

The tests added in the previous commit configure the "server"
repository with 'uploadpack.allowfilter', in order for it to act as a
promisor remote, and also with 'uploadpack.allowanysha1inwant'.

This second setting is unnecessary as it only affects protocol v0
operations; protocol v2, the default since eb049759fb (protocol:
re-enable v2 protocol by default, 2020-09-25), allows any OID in want
without any configuration needed.

Remove this config from both tests.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---

Notes:
    This is based on the version in next: f05da2b48b (clone, submodule: pass
    partial clone filters to submodules, 2022-02-04).
    
    Both tests still pass.
    
    I wondered if it would be best to add '-c protocol.version=2' later on in the
    tests, to allow runnning these tests with GIT_TEST_PROTOCOL_VERSION, but I was
    not sure.
    
    Note that as I remarked in [1] last summer, the fact that
    'allow{Tip,Reachable,Any}Sha1InWant' have no effect under protocol v2 is still
    missing from the documentation...
    
    [1] https://lore.kernel.org/git/1a98c659-e7db-50a6-faf3-b3b4c15df679@gmail.com/

 t/t5617-clone-submodules-remote.sh | 3 +--
 t/t7814-grep-recurse-submodules.sh | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh
index ca8f80083a..3fc93b1f8d 100755
--- a/t/t5617-clone-submodules-remote.sh
+++ b/t/t5617-clone-submodules-remote.sh
@@ -31,8 +31,7 @@ test_expect_success 'setup' '
 # bare clone giving "srv.bare" for use as our server.
 test_expect_success 'setup bare clone for server' '
 	git clone --bare "file://$(pwd)/." srv.bare &&
-	git -C srv.bare config --local uploadpack.allowfilter 1 &&
-	git -C srv.bare config --local uploadpack.allowanysha1inwant 1
+	git -C srv.bare config --local uploadpack.allowfilter 1
 '
 
 test_expect_success 'clone with --no-remote-submodules' '
diff --git a/t/t7814-grep-recurse-submodules.sh b/t/t7814-grep-recurse-submodules.sh
index a4476dc492..1c9aec06a3 100755
--- a/t/t7814-grep-recurse-submodules.sh
+++ b/t/t7814-grep-recurse-submodules.sh
@@ -563,9 +563,7 @@ test_expect_success 'grep partially-cloned submodule' '
 		git commit -m "Update submodule" &&
 		test_tick &&
 		git config --local uploadpack.allowfilter 1 &&
-		git config --local uploadpack.allowanysha1inwant 1 &&
-		git -C sub config --local uploadpack.allowfilter 1 &&
-		git -C sub config --local uploadpack.allowanysha1inwant 1
+		git -C sub config --local uploadpack.allowfilter 1
 	) &&
 	# Clone the superproject & submodule, then make sure we can lazy-fetch submodule objects.
 	git clone --filter=blob:none --also-filter-submodules \

base-commit: f05da2b48b48a46db65fc768b3ffecaf996dd655
-- 
2.29.2


      parent reply	other threads:[~2022-02-19 17:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21  3:32 [PATCH] clone, submodule: pass partial clone filters to submodules Josh Steadmon
2022-01-22  1:49 ` Junio C Hamano
2022-01-25 21:00   ` Elijah Newren
2022-01-26  6:03     ` Junio C Hamano
2022-02-01 21:33       ` Josh Steadmon
2022-01-25 21:08 ` Elijah Newren
2022-02-01 21:34   ` Josh Steadmon
2022-02-05  0:40 ` [PATCH v2] " Josh Steadmon
2022-02-05  0:54   ` Josh Steadmon
2022-02-05  1:00     ` Josh Steadmon
2022-02-05  5:00 ` [PATCH v3] " Josh Steadmon
2022-02-09 22:44   ` Jonathan Tan
2022-02-09 23:37     ` Junio C Hamano
2022-02-19 17:30   ` Philippe Blain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220219173010.2859-1-levraiphilippeblain@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=steadmon@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.