Browse Source

t/lib-submodule-update.sh: allow local submodules

To prepare for changing the default value of `protocol.file.allow` to
"user", update the `prolog()` function in lib-submodule-update to allow
submodules to be cloned over the file protocol.

This is used by a handful of submodule-related test scripts, which
themselves will have to tweak the value of `protocol.file.allow` in
certain locations. Those will be done in subsequent commits.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
maint
Taylor Blau 3 years ago
parent
commit
7de0c306f7
  1. 1
      t/lib-submodule-update.sh

1
t/lib-submodule-update.sh

@ -196,6 +196,7 @@ test_git_directory_exists () {
# the submodule repo if it doesn't exist and configures the most problematic # the submodule repo if it doesn't exist and configures the most problematic
# settings for diff.ignoreSubmodules. # settings for diff.ignoreSubmodules.
prolog () { prolog () {
test_config_global protocol.file.allow always &&
(test -d submodule_update_repo || create_lib_submodule_repo) && (test -d submodule_update_repo || create_lib_submodule_repo) &&
test_config_global diff.ignoreSubmodules all && test_config_global diff.ignoreSubmodules all &&
test_config diff.ignoreSubmodules all test_config diff.ignoreSubmodules all

Loading…
Cancel
Save