test-lib: set $TRASH_DIRECTORY earlier
[gitweb.git] / t / t0001-init.sh
index 28f34fd3bd3c0ab2b24138fcaff413823208f5a1..42a263cadafe55803bacf5e8bc071b9999618fc4 100755 (executable)
@@ -319,14 +319,14 @@ test_lazy_prereq GETCWD_IGNORES_PERMS '
        base=GETCWD_TEST_BASE_DIR &&
        mkdir -p $base/dir &&
        chmod 100 $base ||
-       error "bug in test script: cannot prepare $base"
+       BUG "cannot prepare $base"
 
        (cd $base/dir && /bin/pwd -P)
        status=$?
 
        chmod 700 $base &&
        rm -rf $base ||
-       error "bug in test script: cannot clean $base"
+       BUG "cannot clean $base"
        return $status
 '
 
@@ -407,7 +407,7 @@ is_hidden () {
 test_expect_success MINGW '.git hidden' '
        rm -rf newdir &&
        (
-               unset GIT_DIR GIT_WORK_TREE
+               sane_unset GIT_DIR GIT_WORK_TREE &&
                mkdir newdir &&
                cd newdir &&
                git init &&
@@ -419,7 +419,7 @@ test_expect_success MINGW '.git hidden' '
 test_expect_success MINGW 'bare git dir not hidden' '
        rm -rf newdir &&
        (
-               unset GIT_DIR GIT_WORK_TREE GIT_CONFIG
+               sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&
                mkdir newdir &&
                cd newdir &&
                git --bare init