worktree: make --detach mutually exclusive with -b/-B
Be consistent with git-checkout which disallows this (not particularly meaningful) combination. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5dd6e234a7
commit
ab0b2c53ed
@ -167,4 +167,16 @@ test_expect_success '"add" auto-vivify does not clobber existing branch' '
|
||||
test_path_is_missing precious
|
||||
'
|
||||
|
||||
test_expect_success '"add" -b/-B mutually exclusive' '
|
||||
test_must_fail git worktree add -b poodle -B poodle bamboo master
|
||||
'
|
||||
|
||||
test_expect_success '"add" -b/--detach mutually exclusive' '
|
||||
test_must_fail git worktree add -b poodle --detach bamboo master
|
||||
'
|
||||
|
||||
test_expect_success '"add" -B/--detach mutually exclusive' '
|
||||
test_must_fail git worktree add -B poodle --detach bamboo master
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user