From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:06 +0000 (+0700) Subject: t1510: setup case #7 X-Git-Tag: v1.7.4-rc0~4^2~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=561a7e667fb8b589c90b67fe4cac32d03b6f840f;p=git.git t1510: setup case #7 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 6e23c9832..8c6c0bca2 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -871,4 +871,270 @@ EOF test_repo 6/sub/sub "$TRASH_DIRECTORY/6/.git" ' +# +# case #7 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a directory +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# core.worktree is overridden by GIT_WORK_TREE -> #3 + +test_expect_success '#7: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub && + cd 7 && + git init && + git config core.worktree non-existent && + cd .. +' + +test_expect_success '#7: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >7/expected <7/expected <7/expected <7/expected <7/sub/sub/expected <7/sub/sub/expected <7/sub/expected <7/sub/sub/expected <7/expected <7/expected <7/expected <7/expected <7/sub/sub/expected <7/sub/sub/expected <7/sub/sub/expected <7/sub/sub/expected <7/expected <7/expected <7/expected <7/expected <7/sub/sub/expected <7/sub/sub/expected <7/sub/sub/expected <7/sub/sub/expected <