Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-11-26 18:32:29 +0300
committerJunio C Hamano <gitster@pobox.com>2010-11-30 00:26:00 +0300
commita2f509e1d8d8103a719fd6784e859c0af8c1adf5 (patch)
tree4ec22c3e6ce768edbf0f0f24e117af1d3dafa0c8 /t/t1510-repo-setup.sh
parent6ab5da1185e50051bcc375dfa3ad6f2de7054b2b (diff)
t1510: setup case #30
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1510-repo-setup.sh')
-rwxr-xr-xt/t1510-repo-setup.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index f1b5ea530e..6f298a2b1a 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -4221,4 +4221,43 @@ EOF
test_repo 29/sub
'
+#
+# case #30
+#
+############################################################
+#
+# Input:
+#
+# - GIT_WORK_TREE is not set
+# - GIT_DIR is set
+# - core.worktree is set
+# - .git is a file
+# - core.bare is set
+#
+# Output:
+#
+# core.worktree and core.bare conflict, won't fly.
+
+test_expect_success '#30: setup' '
+ unset GIT_DIR GIT_WORK_TREE &&
+ mkdir 30 &&
+ cd 30 &&
+ git init &&
+ git config core.bare true &&
+ git config core.worktree non-existent &&
+ mv .git ../30.git &&
+ echo gitdir: ../30.git >.git &&
+ cd ..
+'
+
+test_expect_failure '#30: at root' '
+ (
+ cd 30 &&
+ GIT_DIR=.git &&
+ export GIT_DIR &&
+ test_must_fail git symbolic-ref HEAD 2>result &&
+ grep "core.bare and core.worktree do not make sense" result
+ )
+'
+
test_done