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