From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:14 +0000 (+0700) Subject: t1510: setup case #15 X-Git-Tag: v1.7.4-rc0~4^2~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f7c85883224600c3027bc2faced0368ccb933c4f;p=git.git t1510: setup case #15 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 53816c9c6..25f7c015e 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -1957,4 +1957,272 @@ EOF test_repo 14/sub/sub "$TRASH_DIRECTORY/14/.git" ' +# +# case #15 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a file +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# #7 except that git_dir is set by .git file + +test_expect_success '#15: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub && + cd 15 && + git init && + git config core.worktree non-existent && + mv .git ../15.git && + echo gitdir: ../15.git >.git && + cd .. +' + +test_expect_failure '#15: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >15/expected <15/expected <15/expected <15/expected <15/sub/sub/expected <15/sub/sub/expected <15/sub/expected <15/sub/sub/expected <15/expected <15/expected <15/expected <15/expected <15/sub/sub/expected <15/sub/sub/expected <15/sub/sub/expected <15/sub/sub/expected <15/expected <15/expected <15/expected <15/expected <15/sub/sub/expected <15/sub/sub/expected <15/sub/sub/expected <15/sub/sub/expected <