Merge branch 'nd/complete-format-patch'
[gitweb.git] / t / t0001-init.sh
index c413bff9cf1f3a79ef494b39844c42d3a8c877f1..182da069f1743b8a06b65396599f94530080e67f 100755 (executable)
@@ -167,9 +167,8 @@ test_expect_success 'reinit' '
        ) &&
        test_i18ngrep "Initialized empty" again/out1 &&
        test_i18ngrep "Reinitialized existing" again/out2 &&
-       >again/empty &&
-       test_i18ncmp again/empty again/err1 &&
-       test_i18ncmp again/empty again/err2
+       test_must_be_empty again/err1 &&
+       test_must_be_empty again/err2
 '
 
 test_expect_success 'init with --template' '
@@ -287,6 +286,7 @@ test_expect_success 'init notices EEXIST (2)' '
 '
 
 test_expect_success POSIXPERM,SANITY 'init notices EPERM' '
+       test_when_finished "chmod +w newdir" &&
        rm -fr newdir &&
        mkdir newdir &&
        chmod -w newdir &&
@@ -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