From: Nguyễn Thái Ngọc Duy Date: Fri, 29 Oct 2010 06:48:45 GMT Subject: [PATCH 33/42] t1510: setup case #30 Message-ID: <1288334934-17216-34-git-send-email-pclouds@gmail.com> In-Reply-To: <1288334934-17216-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t1510-repo-setup.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index e691d1c..02b8e65 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -4206,4 +4206,41 @@ EOF test_repo 29/sub ' +# +# case #30 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a file +# - core.bare is set +# +# Output: +# +# core.worktree and core.bare conflict, won't fly. + +test_expect_success '#30: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 30 && + cd 30 && + git init && + git config core.bare true && + git config core.worktree non-existent && + mv .git ../30.git && + echo gitdir: ../30.git >.git && + cd .. +' + +test_expect_failure '#30: at root' ' + ( + cd 30 && + GIT_DIR=.git test_must_fail git symbolic-ref HEAD 2>result && + grep "core.bare and core.worktree do not make sense" result + ) +' + test_done -- 1.7.0.2.445.gcbdb3