From: Michael J Gruber Date: Thu, 04 Dec 2014 13:26:44 GMT Subject: [RFC/PATCH 1/2] t3200-branch: test -M Message-ID: <4522a9a6606467e130c2430d717286c92c777b6f.1417699299.git.git@drmicha.warpmail.net> In-Reply-To: Signed-off-by: Michael J Gruber --- 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.rc3.286.g888a711