diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 23:27:36 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 23:27:36 +0300 |
commit | 15a171f6eb436f9a31986f78bbb115ed4540ad5b (patch) | |
tree | ec842014cc66b120d3923bcc01e7815dff84e7f0 /t/t3200-branch.sh | |
parent | 00c194a819eb7ace8f7691adb3e47eca8b6472fb (diff) | |
parent | 356e91f2ecc581f3a446bba566ab1756dc57a583 (diff) |
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-x | t/t3200-branch.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 432921b6b8..ddea49808d 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 && |