From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:00 +0000 (+0700) Subject: t1510: setup case #1 X-Git-Tag: v1.7.4-rc0~4^2~43 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8fbee484a8ee0f00096571aff92c253ec39f28c2;p=git.git t1510: setup case #1 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 26842274a..9324d3ff6 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -105,4 +105,51 @@ EOF test_repo 0/sub ' +# +# case #1 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is not set +# - core.worktree is not set +# - .git is a directory +# - core.bare is not set, cwd is outside .git +# +# Output: +# +# GIT_WORK_TREE is ignored -> #0 + +test_expect_success '#1: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub && + cd 1 && + git init && + GIT_WORK_TREE=non-existent && + export GIT_WORK_TREE && + cd .. +' + +test_expect_failure '#1: at root' ' + cat >1/expected <1/sub/expected <