From: Nguyễn Thái Ngọc Duy Date: Sun, 24 Oct 2010 12:11:44 GMT Subject: [WIP PATCH 12/18] t1510: setup case #9 Message-ID: <1287922310-14678-13-git-send-email-pclouds@gmail.com> In-Reply-To: <1287922310-14678-1-git-send-email-pclouds@gmail.com> --- t/t1510-repo-setup.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index c77c245..c516155 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -1315,4 +1315,52 @@ EOF test_repo 8/sub ' +# +# case #9 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is not set +# - core.worktree is not set +# - .git is a file +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# same as case #1 except that git_dir is set by .git file + +test_expect_success '#9: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub && + cd 9 && + git init && + mv .git ../9.git && + echo gitdir: ../9.git >.git && + cd .. +' + +# FIXME: check for warning that GIT_WORK_TREE is ignored +test_expect_failure '#9: at root' ' + cat >9/expected <9/sub/expected <