From: Nguyễn Thái Ngọc Duy Date: Fri, 29 Oct 2010 06:48:40 GMT Subject: [PATCH 28/42] t1510: setup case #25 Message-ID: <1288334934-17216-29-git-send-email-pclouds@gmail.com> In-Reply-To: <1288334934-17216-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t1510-repo-setup.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 1965838..a853337 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3723,4 +3723,53 @@ EOF test_repo 24/sub ' +# +# case #25 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is not set +# - core.worktree is not set +# - .git is a file +# - core.bare is set +# +# Output: +# +# #17.2 except git_dir is set according to .git file + +test_expect_success '#25: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 25 25/sub && + cd 25 && + git init && + git config core.bare true && + export GIT_WORK_TREE=non-existent && + mv .git ../25.git && + echo gitdir: ../25.git >.git && + cd .. +' + +test_expect_failure '#25: at root' ' + cat >25/expected <25/sub/expected <