From: Michael J Gruber Date: Mon, 08 Dec 2014 16:28:44 GMT Subject: [PATCHv2 1/2] t3200-branch: test -M Message-ID: <4f734d9f44bd6aa1b54ca3f81aa0e3822286f9d9.1418055912.git.git@drmicha.warpmail.net> In-Reply-To: Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- t/t3200-branch.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 432921b..0b3b8f5 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -97,6 +97,15 @@ test_expect_success 'git branch -m o/o o should fail when o/p exists' ' test_must_fail git branch -m o/o o ' +test_expect_success 'git branch -m o/q o/p should fail when o/p exists' ' + git branch o/q && + test_must_fail git branch -m o/q o/p +' + +test_expect_success 'git branch -M o/q o/p should work when o/p exists' ' + git branch -M o/q o/p +' + test_expect_success 'git branch -m q r/q should fail when r exists' ' git branch q && git branch r && -- 2.2.0.345.g7041aac