git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t5617,t7814: remove unnecessary 'uploadpack.allowanysha1inwant'

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Feb 19, 2022, 17:30 UTC
Message-ID
<20220219173010.2859-1-levraiphilippeblain@gmail.com>
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
Previous: Junio C Hamano
Message 14 of 14 in “clone, submodule: pass partial clone filters to submodules”
  1. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Jan 21, 2022
  2. Junio C HamanoJan 22, 2022
  3. Elijah NewrenJan 25, 2022
  4. Junio C HamanoJan 26, 2022
  5. Josh SteadmonFeb 1, 2022
  6. Elijah NewrenJan 25, 2022
  7. Josh SteadmonFeb 1, 2022
  8. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Feb 5, 2022
  9. Josh SteadmonFeb 5, 2022
  10. Josh SteadmonFeb 5, 2022
  11. clone, submodule: pass partial clone filters to submodulesJosh Steadmon, Feb 5, 2022
  12. Jonathan TanFeb 9, 2022
  13. Junio C HamanoFeb 9, 2022
  14. t5617,t7814: remove unnecessary 'uploadpack.allowanysha1inwant'Philippe Blain, Feb 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.