X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft0001-init.sh;h=620da5b32041b1ad69bfdcb6d139f2705386a5ff;hb=6a42cfe86c485675987b64690e75d8821567d328;hp=d31887f9bf35a7fa9e31b1eb859a9cf21c918d6c;hpb=196821f440d46029f0399a7d97c0cfc78a870244;p=git.git diff --git a/t/t0001-init.sh b/t/t0001-init.sh index d31887f9b..620da5b32 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -83,11 +83,11 @@ test_expect_success 'init --bare' ' ( unset GIT_DIR GIT_WORK_TREE GIT_CONFIG - mkdir git-init-bare.git && - cd git-init-bare.git && + mkdir init-bare.git && + cd init-bare.git && git init --bare ) && - check_config git-init-bare.git true unset + check_config init-bare.git true unset ' test_expect_success 'GIT_DIR non-bare' ' @@ -141,4 +141,30 @@ test_expect_success 'reinit' ' test_cmp again/empty again/err2 ' +test_expect_success 'init with --template' ' + mkdir template-source && + echo content >template-source/file && + ( + mkdir template-custom && + cd template-custom && + git init --template=../template-source + ) && + test_cmp template-source/file template-custom/.git/file +' + +test_expect_success 'init with --template (blank)' ' + ( + mkdir template-plain && + cd template-plain && + git init + ) && + test -f template-plain/.git/info/exclude && + ( + mkdir template-blank && + cd template-blank && + git init --template= + ) && + ! test -f template-blank/.git/info/exclude +' + test_done