From 2e8c6bab2e75b4965dea90663a9cbd5d4377a12f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 26 Nov 2010 22:32:27 +0700 Subject: [PATCH] t1510: setup case #28 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t1510-repo-setup.sh | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index f053a7d95..d67733c89 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -4122,4 +4122,53 @@ EOF test_repo 27/sub/sub "$TRASH_DIRECTORY/27/.git" "$TRASH_DIRECTORY" ' +# +# case #28 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is not set +# - core.worktree is set +# - .git is a file +# - core.bare is set +# +# Output: +# +# core.worktree is ignored -> #24 + +test_expect_success '#28: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 28 28/sub && + cd 28 && + git init && + git config core.bare true && + git config core.worktree non-existent && + mv .git ../28.git && + echo gitdir: ../28.git >.git && + cd .. +' + +test_expect_success '#28: at root' ' + cat >28/expected <28/sub/expected <