git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 5, 2006, 11:57 UTC
Message-ID
<81b0412b0601050357s2446b103we3e9beff5de50be9@mail.gmail.com>

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 <raa.lkml@gmail.com>
Subject: [PATCH] Check, if trash directory was successfully created

and was entered. Otherwise git-init-db will create it directly in the working directory which can be dangerous with all these nasty rm's in the tests

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
01d3f8fc7499a2dd5e21513187de7d73af080533
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a97d259..7534a76 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -195,7 +195,7 @@ test -d ../templates/blt || {
 test=trash
 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?"
 
-- 
1.0.GIT
Message 1 of 1 in “trivial: check, if t/trash directory was successfully created”
  1. Alex RiesenJan 5, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.