checkout: add --ignore-other-wortrees
[gitweb.git] / t / t2025-checkout-to.sh
index 915b506b6c91066ebf4217aad66e38a2b0298125..f8e4df4818523de74ff7330f015415bfb9cc8227 100755 (executable)
@@ -79,6 +79,13 @@ test_expect_success 'die the same branch is already checked out' '
        )
 '
 
+test_expect_success 'not die the same branch is already checked out' '
+       (
+               cd here &&
+               git checkout --ignore-other-worktrees --to anothernewmaster newmaster
+       )
+'
+
 test_expect_success 'not die on re-checking out current branch' '
        (
                cd there &&