From e0d769d1fda4f66a1c0b99f3f52a25d4f4006162 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:30 +0700 Subject: [PATCH] t1510: setup case #31 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 | 269 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 6f298a2b1..fbab9c7e6 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -4260,4 +4260,273 @@ test_expect_failure '#30: at root' ' ) ' +# +# case #31 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a file +# - core.bare is set +# +# Output: +# +# #23 except git_dir is set according to .git file + +test_expect_success '#31: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub && + cd 31 && + git init && + git config core.bare true && + git config core.worktree non-existent && + mv .git ../31.git && + echo gitdir: ../31.git >.git && + cd .. +' + +test_expect_failure '#31: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >31/expected <31/expected <31/expected <31/expected <31/sub/sub/expected <31/sub/sub/expected <31/sub/expected <31/sub/sub/expected <31/expected <31/expected <31/expected <31/expected <31/sub/sub/expected <31/sub/sub/expected <31/sub/sub/expected <31/sub/sub/expected <31/expected <31/expected <31/expected <31/expected <31/sub/sub/expected <31/sub/sub/expected <31/sub/sub/expected <31/sub/sub/expected <