summaryrefslogtreecommitdiff
path: root/t/t2025-worktree-add.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-07-17 23:00:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-20 18:29:24 (GMT)
commitab0b2c53ed853e34def18e7b84acd7da7e2ddd49 (patch)
tree6c89e86f3f5ec319aa1c4b0c4cdee378dc867fb4 /t/t2025-worktree-add.sh
parent5dd6e234a75bb96e159c4e7d30f6acb28c3283a0 (diff)
downloadgit-ab0b2c53ed853e34def18e7b84acd7da7e2ddd49.zip
git-ab0b2c53ed853e34def18e7b84acd7da7e2ddd49.tar.gz
git-ab0b2c53ed853e34def18e7b84acd7da7e2ddd49.tar.bz2
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>
Diffstat (limited to 't/t2025-worktree-add.sh')
-rwxr-xr-xt/t2025-worktree-add.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
index 9e30690..249e454 100755
--- a/t/t2025-worktree-add.sh
+++ b/t/t2025-worktree-add.sh
@@ -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