From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:24 +0000 (+0700) Subject: t1510: setup case #25 X-Git-Tag: v1.7.4-rc0~4^2~19 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=468d68226c6514a1c30390819da96c8a495c23d0;p=git.git t1510: setup case #25 Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 79959f6dc..5be85eded 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3736,4 +3736,54 @@ 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 && + GIT_WORK_TREE=non-existent && + export GIT_WORK_TREE && + mv .git ../25.git && + echo gitdir: ../25.git >.git && + cd .. +' + +test_expect_failure '#25: at root' ' + cat >25/expected <25/sub/expected <