From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:09 +0000 (+0700) Subject: t1510: setup case #10 X-Git-Tag: v1.7.4-rc0~4^2~34 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=773ec9319e4718e0346aa5a273e16ff5b35a0e4b;p=git.git t1510: setup case #10 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 29f0f2a07..159ee51ac 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -1233,4 +1233,71 @@ EOF test_repo 9/sub ' +# +# case #10 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is not set +# - GIT_DIR is set +# - core.worktree is not set +# - .git is a file +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# #2 except that git_dir is set by .git file + +test_expect_success '#10: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 10 10/sub && + cd 10 && + git init && + mv .git ../10.git && + echo gitdir: ../10.git >.git && + cd .. +' + +test_expect_failure '#10: at root' ' + cat >10/expected <10/sub/expected <10/expected <10/sub/expected <