Skip to content

Commit e4bea4a

Browse files
committed
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
2 parents a45b824 + 614c3d8 commit e4bea4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/test-lib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,8 @@ fi
13431343
GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt
13441344
GIT_CONFIG_NOSYSTEM=1
13451345
GIT_ATTR_NOSYSTEM=1
1346-
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM
1346+
GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/.."
1347+
export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_ATTR_NOSYSTEM GIT_CEILING_DIRECTORIES
13471348

13481349
if test -z "$GIT_TEST_CMP"
13491350
then

0 commit comments

Comments
 (0)