From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:26 +0000 (+0700) Subject: t1510: setup case #27 X-Git-Tag: v1.7.4-rc0~4^2~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=00bc13a9774610de0ea0952d0f011b14c18e52cb;p=git.git t1510: setup case #27 Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 <