mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
tests/fetchGitSubmodules: fix for newer Git
This commit is contained in:
parent
e4a2a08b04
commit
ff62f6a84b
1 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,15 @@ subRepo=$TEST_ROOT/gitSubmodulesSub
|
|||
|
||||
rm -rf ${rootRepo} ${subRepo} $TEST_HOME/.cache/nix
|
||||
|
||||
# Submodules can't be fetched locally by default, which can cause
|
||||
# information leakage vulnerabilities, but for these tests our
|
||||
# submodule is intentionally local and it's all trusted, so we
|
||||
# disable this restriction. Setting it per repo is not sufficient, as
|
||||
# the repo-local config does not apply to the commands run from
|
||||
# outside the repos by Nix.
|
||||
export XDG_CONFIG_HOME=$TEST_HOME/.config
|
||||
git config --global protocol.file.allow always
|
||||
|
||||
initGitRepo() {
|
||||
git init $1
|
||||
git -C $1 config user.email "foobar@example.com"
|
||||
|
|
Loading…
Reference in a new issue