]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t6NNN: allow local submodules
authorTaylor Blau <me@ttaylorr.com>
Fri, 29 Jul 2022 19:21:18 +0000 (15:21 -0400)
committerTaylor Blau <me@ttaylorr.com>
Sat, 1 Oct 2022 04:23:38 +0000 (00:23 -0400)
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 only need to interact with submodules in a limited capacity
have individual Git commands annotated with the appropriate
configuration via `-c`.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
t/t6008-rev-list-submodule.sh
t/t6134-pathspec-in-submodule.sh

index c4af9ca0a7edf6230dc6ca8ec10848545971fce7..a65e5f283ccad172617e6b136928f8e59d38f213 100755 (executable)
@@ -23,7 +23,7 @@ test_expect_success 'setup' '
 
        : > super-file &&
        git add super-file &&
-       git submodule add "$(pwd)" sub &&
+       git -c protocol.file.allow=always submodule add "$(pwd)" sub &&
        git symbolic-ref HEAD refs/heads/super &&
        test_tick &&
        git commit -m super-initial &&
index c670668409817c6d1066de53dc294bade2f27e93..2fde65b4311337dc2be1e18a96ebe34e6cbdaa20 100755 (executable)
@@ -9,7 +9,7 @@ test_expect_success 'setup a submodule' '
        : >pretzel/a &&
        git -C pretzel add a &&
        git -C pretzel commit -m "add a file" -- a &&
-       git submodule add ./pretzel sub &&
+       git -c protocol.file.allow=always submodule add ./pretzel sub &&
        git commit -a -m "add submodule" &&
        git submodule deinit --all
 '