summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ab5da1)
raw | patch | inline | side by side (parent: 6ab5da1)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Fri, 26 Nov 2010 15:32:29 +0000 (22:32 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 29 Nov 2010 21:26:00 +0000 (13:26 -0800) |
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1510-repo-setup.sh | patch | blob | history |
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index f1b5ea530e7f7a3fa0257d20728a9af91e5bfa60..6f298a2b1a0059176c735e284d346eda0569d701 100755 (executable)
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
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