Skip to content

Commit

Permalink
t1510: setup case #30
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Nov 29, 2010
1 parent 6ab5da1 commit a2f509e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions t/t1510-repo-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a2f509e

Please sign in to comment.