From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:17 +0000 (+0700) Subject: t1510: setup case #18 X-Git-Tag: v1.7.5.4~1^2~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/37eecb3db60843f54bf53f4168bb7fd1d1001c58?ds=sidebyside t1510: setup case #18 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 8d4ef4cd1f..a828b0355b 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -2489,4 +2489,75 @@ EOF test_repo 17/sub ' +# +# case #18 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is set +# - core.worktree is not set +# - .git is a directory +# - core.bare is set +# +# Output: +# +# - no worktree (rule #8) +# - cwd is unchanged +# - prefix is NULL +# - git_dir is set to $GIT_DIR +# - cwd can't be outside worktree + +test_expect_success '#18: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 18 18/sub && + cd 18 && + git init && + mkdir .git/wt .git/wt/sub && + git config core.bare true && + cd .. +' + +test_expect_success '#18: (rel) at root' ' + cat >18/expected <18/expected <18/sub/expected <18/sub/expected <