aboutsummaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:36 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:36 -0800
commit15a171f6eb436f9a31986f78bbb115ed4540ad5b (patch)
treeec842014cc66b120d3923bcc01e7815dff84e7f0 /t/t3200-branch.sh
parent00c194a819eb7ace8f7691adb3e47eca8b6472fb (diff)
parent356e91f2ecc581f3a446bba566ab1756dc57a583 (diff)
downloadgit-15a171f6eb436f9a31986f78bbb115ed4540ad5b.tar.gz
git-15a171f6eb436f9a31986f78bbb115ed4540ad5b.tar.xz
Merge branch 'mg/branch-d-m-f'
"git branch -d" (delete) and "git branch -m" (move) learned to honor "-f" (force) flag; unlike many other subcommands, the way to force these have been with separate "-D/-M" options, which was inconsistent. * mg/branch-d-m-f: branch: allow -f with -m and -d t3200-branch: test -M
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 432921b6b..ddea49808 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -97,6 +97,20 @@ 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 -f o/q o/p should work when o/p exists' '
+ git branch o/q &&
+ git branch -m -f o/q o/p
+'
+
test_expect_success 'git branch -m q r/q should fail when r exists' '
git branch q &&
git branch r &&