From: Nguyễn Thái Ngọc Duy Date: Fri, 26 Nov 2010 15:32:18 +0000 (+0700) Subject: t1510: setup case #19 X-Git-Tag: v1.7.4-rc0~4^2~25 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=09327fd8f77cc7115684902528a5ba31bd6c5cff;p=git.git t1510: setup case #19 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 a828b0355..136290298 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -2560,4 +2560,270 @@ EOF test_repo 18/sub "$TRASH_DIRECTORY/18/.git" ' +# +# case #19 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - .git is a directory +# - core.worktree is not set +# - core.bare is set +# +# Output: +# +# bare repo is overridden by GIT_WORK_TREE -> #3 + +test_expect_success '#19: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub && + cd 19 && + git init && + git config core.bare true && + cd .. +' + +test_expect_success '#19: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >19/expected <19/expected <19/expected <19/expected <19/sub/sub/expected <19/sub/sub/expected <19/sub/expected <19/sub/sub/expected <19/expected <19/expected <19/expected <19/expected <19/sub/sub/expected <19/sub/sub/expected <19/sub/sub/expected <19/sub/sub/expected <19/expected <19/expected <19/expected <19/expected <19/sub/sub/expected <19/sub/sub/expected <19/sub/sub/expected <19/sub/sub/expected <