From 1d0fa898eaa879d2fa4785164c3261dd40fe5f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 3 Jan 2015 16:41:26 +0700 Subject: checkout: add --ignore-other-wortrees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed-by: Mark Levedahl Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t2025-checkout-to.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 't/t2025-checkout-to.sh') diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh index 915b506b6c..f8e4df4818 100755 --- a/t/t2025-checkout-to.sh +++ b/t/t2025-checkout-to.sh @@ -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 && -- cgit v1.2.3