diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-10 21:46:23 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-10 21:46:24 +0300 |
commit | e4897d2bde2bc6f8a63c468e1ff8617314269dcd (patch) | |
tree | 79068c9884a37fb164563684491ce7cc6399b590 /t | |
parent | 6f9e7cadf35796d798037782f149bec584ff803c (diff) | |
parent | 614c3d8f2e330baedfdb09fc90803a4c360d39cb (diff) |
Merge branch 'sg/set-ceiling-during-tests'
Buggy tests could damage repositories outside the throw-away test
area we created. We now by default export GIT_CEILING_DIRECTORIES
to limit the damage from such a stray test.
* sg/set-ceiling-during-tests:
test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index abcfbed6d6..fc1e521519 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1343,7 +1343,8 @@ fi GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt GIT_CONFIG_NOSYSTEM=1 GIT_ATTR_NOSYSTEM=1 -export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM +GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/.." +export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM GIT_CEILING_DIRECTORIES if test -z "$GIT_TEST_CMP" then |