From 5362cbfcf3b8939edc4bd0058d6b8b08d4621234 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 26 Nov 2010 22:32:22 +0700 Subject: [PATCH] t1510: setup case #23 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t1510-repo-setup.sh | 267 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 1720fe25e..ad27d1278 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -3421,4 +3421,271 @@ test_expect_failure '#22.2: at root' ' ) ' +# +# case #23 +# +############################################################ +# +# Input: +# +# - GIT_WORK_TREE is set +# - GIT_DIR is set +# - core.worktree is set +# - .git is a directory +# - core.bare is set +# +# Output: +# +# core.worktree is overridden by GIT_WORK_TREE -> #19 + +test_expect_success '#23: setup' ' + unset GIT_DIR GIT_WORK_TREE && + mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub && + cd 23 && + git init && + git config core.bare true && + git config core.worktree non-existent && + cd .. +' + +test_expect_success '#23: GIT_DIR(rel), GIT_WORK_TREE=root at root' ' + cat >23/expected <23/expected <23/expected <23/expected <23/sub/sub/expected <23/sub/sub/expected <23/sub/expected <23/sub/sub/expected <23/expected <23/expected <23/expected <23/expected <23/sub/sub/expected <23/sub/sub/expected <23/sub/sub/expected <23/sub/sub/expected <23/expected <23/expected <23/expected <23/expected <23/sub/sub/expected <23/sub/sub/expected <23/sub/sub/expected <23/sub/sub/expected <