From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:04 +0000 (+0700) Subject: t1510: setup case #5 X-Git-Tag: v1.7.4-rc0~4^2~39 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f388c173092c7e0a214f2bafce8bac6e94951f9;p=git.git t1510: setup case #5 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 1b4070a7e..f58d424f0 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -532,4 +532,52 @@ EOF test_repo 4/sub ' +# +# case #5 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is not set +# - core.worktree is set +# - .git is a directory +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# GIT_WORK_TREE/core.worktree are ignored -> #0 + +test_expect_success '#5: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 5 5/sub && + cd 5 && + git init && + git config core.worktree non-existent && + GIT_WORK_TREE=non-existent-too && + export GIT_WORK_TREE && + cd .. +' + +test_expect_failure '#5: at root' ' + cat >5/expected <5/sub/expected <