From 4a00884291a1cdd150b162ee148b88b7cd2c30cb 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:19 +0700 Subject: [PATCH] t1510: setup case #20 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 | 128 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 136290298..8e649e0f0 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -2826,4 +2826,132 @@ EOF test_repo 19/sub/sub "$TRASH_DIRECTORY/19/.git" "$TRASH_DIRECTORY" ' +# +# case #20.1 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is not set +# - core.worktree is set +# - .git is a directory +# - cwd is inside .git +# +# Output: +# +# core.worktree is ignored -> #16.1 + +test_expect_success '#20.1: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 20 20/sub && + cd 20 && + git init && + git config core.worktree non-existent && + mkdir .git/wt .git/wt/sub && + cd .. +' + +test_expect_failure '#20.1: at .git' ' + cat >20/.git/expected <20/.git/wt/expected <20/.git/wt/sub/expected < #16.2 + +test_expect_success '#20.2: setup' ' + git config --file="$TRASH_DIRECTORY/20/.git/config" core.bare true +' + +test_expect_success '#20.2: at .git' ' + cat >20/.git/expected <20/.git/wt/expected <20/.git/wt/sub/expected <20/expected <20/sub/expected <