X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft0001-init.sh;h=d31887f9bf35a7fa9e31b1eb859a9cf21c918d6c;hb=2b2828b452bd8b3258de75451f77362decb1dffe;hp=c015405f124f738e66213987c3ba88c7d310caab;hpb=105c21df14531bf2fd39e05b4c3a9aa31349da06;p=git.git diff --git a/t/t0001-init.sh b/t/t0001-init.sh index c015405f1..d31887f9b 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -79,6 +79,17 @@ test_expect_success 'GIT_DIR bare' ' check_config git-dir-bare.git true unset ' +test_expect_success 'init --bare' ' + + ( + unset GIT_DIR GIT_WORK_TREE GIT_CONFIG + mkdir git-init-bare.git && + cd git-init-bare.git && + git init --bare + ) && + check_config git-init-bare.git true unset +' + test_expect_success 'GIT_DIR non-bare' ' ( @@ -113,4 +124,21 @@ test_expect_success 'GIT_DIR & GIT_WORK_TREE (2)' ' fi ' +test_expect_success 'reinit' ' + + ( + unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG + + mkdir again && + cd again && + git init >out1 2>err1 && + git init >out2 2>err2 + ) && + grep "Initialized empty" again/out1 && + grep "Reinitialized existing" again/out2 && + >again/empty && + test_cmp again/empty again/err1 && + test_cmp again/empty again/err2 +' + test_done