aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-04-14 15:38:21 -0400
committerJunio C Hamano <gitster@pobox.com>2013-04-14 23:30:57 -0700
commit002d4ce8aa40644698721d59691d38f1df702f4b (patch)
tree85976b4fab6eaa2c07461dee355c040a979bfee2 /t
parent38b074de80759c95fec20b0dbc30614caccdfd24 (diff)
downloadgit-002d4ce8aa40644698721d59691d38f1df702f4b.tar.gz
git-002d4ce8aa40644698721d59691d38f1df702f4b.tar.xz
t/test-lib.sh: drop "$test" variable
The $test variable is used as an interim buffer for constructing $TRASH_DIRECTORY, and is almost compatible with it (the exception being that $test has not been converted to an absolute path). Let's get rid of it entirely so that later code does not accidentally use it, thinking the two are interchangeable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c5121f498..657b0bd86 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -592,11 +592,11 @@ then
fi
# Test repository
-test="trash directory.$(basename "$0" .sh)"
-test -n "$root" && test="$root/$test"
-case "$test" in
-/*) TRASH_DIRECTORY="$test" ;;
- *) TRASH_DIRECTORY="$TEST_OUTPUT_DIRECTORY/$test" ;;
+TRASH_DIRECTORY="trash directory.$(basename "$0" .sh)"
+test -n "$root" && TRASH_DIRECTORY="$root/$TRASH_DIRECTORY"
+case "$TRASH_DIRECTORY" in
+/*) ;; # absolute path is good
+ *) TRASH_DIRECTORY="$TEST_OUTPUT_DIRECTORY/$TRASH_DIRECTORY" ;;
esac
test ! -z "$debug" || remove_trash=$TRASH_DIRECTORY
rm -fr "$TRASH_DIRECTORY" || {