From 3c3b0a00924aeb6a5e5534341299c6dc7824dd49 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:10 +0700 Subject: [PATCH] t1510: setup case #11 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 | 267 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 159ee51ac..cf98940ed 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -1300,4 +1300,271 @@ EOF test_repo 10/sub ../.git ' +# +# case #11 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - core.worktree is not set +# - .git is a file +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# #3 except that git_dir is set by .git file + +test_expect_success '#11: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub && + cd 11 && + git init && + mv .git ../11.git && + echo gitdir: ../11.git >.git && + cd .. +' + +test_expect_failure '#11: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >11/expected <11/expected <11/expected <11/expected <11/sub/sub/expected <11/sub/sub/expected <11/sub/expected <11/sub/sub/expected <11/expected <11/expected <11/expected <11/expected <11/sub/sub/expected <11/sub/sub/expected <11/sub/sub/expected <11/sub/sub/expected <11/expected <11/expected <11/expected <11/expected <11/sub/sub/expected <11/sub/sub/expected <11/sub/sub/expected <11/sub/sub/expected <