From cdcef7d546e1ccc0b610a23c8a0831ca86b58589 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 26 Nov 2010 22:32:25 +0700 Subject: [PATCH] t1510: setup case #26 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t1510-repo-setup.sh | 68 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 5be85eded..626126f54 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3786,4 +3786,72 @@ EOF test_repo 25/sub ' +# +# case #26 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is set +# - core.worktree is not set +# - .git is a file +# - core.bare is set +# +# Output: +# +# #18 except git_dir is set according to .git file + +test_expect_success '#26: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 26 26/sub && + cd 26 && + git init && + git config core.bare true && + mv .git ../26.git && + echo gitdir: ../26.git >.git && + cd .. +' + +test_expect_failure '#26: (rel) at root' ' + cat >26/expected <26/expected <26/sub/expected <26/sub/expected <