diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2014-12-08 19:28:45 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-10 03:27:47 +0300 |
commit | 356e91f2ecc581f3a446bba566ab1756dc57a583 (patch) | |
tree | 35f1aac2c1db40bc674773127cf0cd9452b8a0b8 /t/t3200-branch.sh | |
parent | ff7aa81f8971daf29826b3881e0e2df5bd7df90c (diff) |
branch: allow -f with -m and -d
-f/--force is the standard way to force an action, and is used by branch
for the recreation of existing branches, but not for deleting unmerged
branches nor for renaming to an existing branch.
Make "-m -f" equivalent to "-M" and "-d -f" equivalent to" -D", i.e.
allow -f/--force to be used with -m/-d also.
For the list modes, "-f" is simply ignored.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-x | t/t3200-branch.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index c08aef4abd..e7bbb8f0ec 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -106,6 +106,11 @@ 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 && |