diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2018-08-28 17:20:25 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-30 09:28:02 -0700 |
commit | f4143101cbb26d189f63f2d29875f4acc07b2730 (patch) | |
tree | 8d1d73f60c1101c88bfb86e59c44ff9aad4f8c29 /t/t2028-worktree-move.sh | |
parent | worktree: teach 'move' to override lock when --force given twice (diff) | |
download | tgif-f4143101cbb26d189f63f2d29875f4acc07b2730.tar.xz |
worktree: teach 'remove' to override lock when --force given twice
For consistency with "add -f -f" and "move -f -f" which override
the lock on a worktree, allow "remove -f -f" to do so, as well, as a
convenience.
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2028-worktree-move.sh')
-rwxr-xr-x | t/t2028-worktree-move.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh index 9756ede8f1..1b5079e8fa 100755 --- a/t/t2028-worktree-move.sh +++ b/t/t2028-worktree-move.sh @@ -163,4 +163,14 @@ test_expect_success 'proper error when worktree not found' ' done ' +test_expect_success 'remove locked worktree (force)' ' + git worktree add --detach gumby && + test_when_finished "git worktree remove gumby || :" && + git worktree lock gumby && + test_when_finished "git worktree unlock gumby || :" && + test_must_fail git worktree remove gumby && + test_must_fail git worktree remove --force gumby && + git worktree remove --force --force gumby +' + test_done |