File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -4221,4 +4221,43 @@ EOF
42214221 test_repo 29/sub
42224222'
42234223
4224+ #
4225+ # case #30
4226+ #
4227+ # ###########################################################
4228+ #
4229+ # Input:
4230+ #
4231+ # - GIT_WORK_TREE is not set
4232+ # - GIT_DIR is set
4233+ # - core.worktree is set
4234+ # - .git is a file
4235+ # - core.bare is set
4236+ #
4237+ # Output:
4238+ #
4239+ # core.worktree and core.bare conflict, won't fly.
4240+
4241+ test_expect_success ' #30: setup' '
4242+ unset GIT_DIR GIT_WORK_TREE &&
4243+ mkdir 30 &&
4244+ cd 30 &&
4245+ git init &&
4246+ git config core.bare true &&
4247+ git config core.worktree non-existent &&
4248+ mv .git ../30.git &&
4249+ echo gitdir: ../30.git >.git &&
4250+ cd ..
4251+ '
4252+
4253+ test_expect_failure ' #30: at root' '
4254+ (
4255+ cd 30 &&
4256+ GIT_DIR=.git &&
4257+ export GIT_DIR &&
4258+ test_must_fail git symbolic-ref HEAD 2>result &&
4259+ grep "core.bare and core.worktree do not make sense" result
4260+ )
4261+ '
4262+
42244263test_done
You can’t perform that action at this time.
0 commit comments