From: Nguyễn Thái Ngọc Duy Date: Wed, 27 Oct 2010 14:49:30 GMT Subject: [PATCH 27/34] t1510: setup case #24 Message-ID: <1288190977-30875-28-git-send-email-pclouds@gmail.com> In-Reply-To: <1288190977-30875-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 30743d6..2660e72 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3675,4 +3675,52 @@ EOF GIT_DIR="$TRASH_DIRECTORY/23/.git" GIT_WORK_TREE="$TRASH_DIRECTORY" test_repo 23/sub/sub ' +# +# case #24 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is not set +# - core.worktree is not set +# - .git is a file +# - core.bare is set +# +# Output: +# +# #16.2 except git_dir is set according to .git file + +test_expect_success '#24: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 24 24/sub && + cd 24 && + git init && + git config core.bare true && + mv .git ../24.git && + echo gitdir: ../24.git >.git && + cd .. +' + +test_expect_success '#24: at root' ' + cat >24/expected <24/sub/expected <