From 69bf2b1604ebf068d732caf111ad11973b8fe90f 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:13 +0700 Subject: [PATCH] t1510: setup case #14 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 | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index b6fdd72374..53816c9c6f 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -1666,4 +1666,295 @@ EOF test_repo 13/sub ' +# +# case #14 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a file +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# #6 except that git_dir is set by .git file + +test_expect_success '#14: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub && + cd 14 && + git init && + mv .git ../14.git && + echo gitdir: ../14.git >.git && + cd .. +' + +test_expect_failure '#14: GIT_DIR(rel), core.worktree=../14 at root' ' + cat >14/expected <14/expected <14/expected <14/expected <14/sub/sub/expected <14/sub/sub/expected <14/sub/expected <14/sub/sub/expected <14/expected <14/expected <14/expected <14/expected <14/sub/sub/expected <14/sub/sub/expected <14/sub/sub/expected <14/sub/sub/expected <14/expected <14/expected <14/expected <14/expected <14/sub/sub/expected <14/sub/sub/expected <14/sub/sub/expected <14/sub/sub/expected <