Alex Riesen  committed 2ccd202

trivial: check, if t/trash directory was successfully created

and was successfully entered. Otherwise git-init-db will create it directly
in the working directory (t/) which can be dangerous.

Signed-off-by: Alex Riesen <>
Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits 10ae7d8
  • Branches master

Comments (0)

Files changed (1)

File t/

 rm -fr "$test"
 mkdir "$test"
-cd "$test"
+cd "$test" || error "Cannot setup test environment"
 "$GIT_EXEC_PATH/git" init-db --template=../../templates/blt/ 2>/dev/null ||
 error "cannot run git init-db -- have you built things yet?"