Merge branch 'jw/gitweb-sample-update' into maint
[gitweb.git] / t / t0001-init.sh
index ca85aae51ed1c528d1b93e7fea5f53ecb8095851..0276d14a0ba66d4af6ad7af14c6b7e98305a1b84 100755 (executable)
@@ -93,6 +93,7 @@ test_expect_success 'No extra GIT_* on alias scripts' '
                sed -n \
                        -e "/^GIT_PREFIX=/d" \
                        -e "/^GIT_TEXTDOMAINDIR=/d" \
+                       -e "/^GIT_TRACE2_PARENT/d" \
                        -e "/^GIT_/s/=.*//p" |
                sort
        EOF
@@ -167,15 +168,14 @@ 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' '
        mkdir template-source &&
        echo content >template-source/file &&
-       git init --template=../template-source template-custom &&
+       git init --template=template-source template-custom &&
        test_cmp template-source/file template-custom/.git/file
 '
 
@@ -320,14 +320,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
 '
 
@@ -454,6 +454,17 @@ test_expect_success 're-init from a linked worktree' '
        )
 '
 
+test_expect_success MINGW 'core.hidedotfiles = false' '
+       git config --global core.hidedotfiles false &&
+       rm -rf newdir &&
+       mkdir newdir &&
+       (
+               sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&
+               git -C newdir init
+       ) &&
+       ! is_hidden newdir/.git
+'
+
 test_expect_success MINGW 'redirect std handles' '
        GIT_REDIRECT_STDOUT=output.txt git rev-parse --git-dir &&
        test .git = "$(cat output.txt)" &&