diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:42 -0700 |
commit | e4bea4a67d6e3fd36f5ea88662495540ff709b8a (patch) | |
tree | c56c19b246613608b6220b66d500413e64650112 | |
parent | Merge branch 'jh/sparse-index-resize-fix' into maint (diff) | |
parent | test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository (diff) | |
download | tgif-e4bea4a67d6e3fd36f5ea88662495540ff709b8a.tar.xz |
Merge branch 'sg/set-ceiling-during-tests' into maint
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
-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 |