git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* trivial: check, if t/trash directory was successfully created
@ 2006-01-05 11:57 Alex Riesen
  0 siblings, 0 replies; only message in thread
From: Alex Riesen @ 2006-01-05 11:57 UTC (permalink / raw)
  To: Junio C Hamano, git

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

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>

[-- Attachment #2: 0010-Check-if-trash-directory-was-successfully-created.txt --]
[-- Type: text/plain, Size: 816 bytes --]

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-05 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 11:57 trivial: check, if t/trash directory was successfully created Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).