From 00bc13a9774610de0ea0952d0f011b14c18e52cb 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:26 +0700 Subject: [PATCH] t1510: setup case #27 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 | 268 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 626126f54..f053a7d95 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3854,4 +3854,272 @@ EOF test_repo 26/sub "$TRASH_DIRECTORY/26/.git" ' +# +# case #27 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - .git is a file +# - core.worktree is not set +# - core.bare is set +# +# Output: +# +# #19 except git_dir is set according to .git file + +test_expect_success '#27: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub && + cd 27 && + git init && + git config core.bare true && + mv .git ../27.git && + echo gitdir: ../27.git >.git && + cd .. +' + +test_expect_failure '#27: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >27/expected <27/expected <27/expected <27/expected <27/sub/sub/expected <27/sub/sub/expected <27/sub/expected <27/sub/sub/expected <27/expected <27/expected <27/expected <27/expected <27/sub/sub/expected <27/sub/sub/expected <27/sub/sub/expected <27/sub/sub/expected <27/expected <27/expected <27/expected <27/expected <27/sub/sub/expected <27/sub/sub/expected <27/sub/sub/expected <27/sub/sub/expected <