aboutsummaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-08-21 09:49:12 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-21 23:38:25 -0700
commit5a4a088add3bdcbe86ae7e87964ce4025ddbc389 (patch)
treecac72e24477925f52665ace7e4e3375a166c1f64 /t/test-lib.sh
parent4be636f42cd75f865204817c307eb1a7b464109c (diff)
downloadgit-5a4a088add3bdcbe86ae7e87964ce4025ddbc389.tar.gz
git-5a4a088add3bdcbe86ae7e87964ce4025ddbc389.tar.xz
test-lib: do not remove trash_directory if called with --debug
Sometimes you want to keep the trash directory, even if all tests passed. For example, when extending tests, it comes it quite handy. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 6212c46cc..e2b106cb6 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -491,7 +491,7 @@ fi
# Test repository
test="trash directory.$(basename "$0" .sh)"
-remove_trash="$TEST_DIRECTORY/$test"
+test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
rm -fr "$test" || {
trap - exit
echo >&5 "FATAL: Cannot prepare test area"