t/t9NNN: allow local submodules

To prepare for the default value of `protocol.file.allow` to change to
"user", ensure tests that rely on local submodules can initialize them
over the file protocol.

Tests that interact with submodules a handful of times use
`test_config_global`.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
This commit is contained in:
Taylor Blau 2022-07-29 15:21:53 -04:00
parent 0d3beb71da
commit f4a32a550f
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,7 @@ test_expect_success 'import with large marks file' '
'
test_expect_success 'setup dump with submodule' '
test_config_global protocol.file.allow always &&
git submodule add "$PWD" sub &&
git commit -m "add submodule" &&
git fast-export HEAD >dump

View File

@ -265,6 +265,7 @@ test_expect_success 'signed-tags=warn-strip' '
test_expect_success 'setup submodule' '
test_config_global protocol.file.allow always &&
git checkout -f master &&
mkdir sub &&
(
@ -290,6 +291,7 @@ test_expect_success 'setup submodule' '
test_expect_success 'submodule fast-export | fast-import' '
test_config_global protocol.file.allow always &&
SUBENT1=$(git ls-tree master^ sub) &&
SUBENT2=$(git ls-tree master sub) &&
rm -rf new &&