diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-02 14:24:05 -0700 |
commit | a4127142c621c03cb0967d298ac0ea1e673162fd (patch) | |
tree | e6383127a5b555b4637c1100da78c0168276623a /t | |
parent | Merge branch 'jk/check-repository-format' into maint (diff) | |
parent | branch -d: refuse deleting a branch which is currently checked out (diff) | |
download | tgif-a4127142c621c03cb0967d298ac0ea1e673162fd.tar.xz |
Merge branch 'ky/branch-d-worktree' into maint
When "git worktree" feature is in use, "git branch -d" allowed
deletion of a branch that is checked out in another worktree
* ky/branch-d-worktree:
branch -d: refuse deleting a branch which is currently checked out
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index a897248490..508007fd37 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -403,6 +403,12 @@ test_expect_success 'test deleting branch without config' ' test_i18ncmp expect actual ' +test_expect_success 'deleting currently checked out branch fails' ' + git worktree add -b my7 my7 && + test_must_fail git -C my7 branch -d my7 && + test_must_fail git branch -d my7 +' + test_expect_success 'test --track without .fetch entries' ' git branch --track my8 && test "$(git config branch.my8.remote)" && |