diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-06-13 19:18:25 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-08 15:31:04 -0700 |
commit | 6d308627cae4d34c058591de73ce14a52b79cf4e (patch) | |
tree | 9d87bb41ad8390127869ed99a4fd453886acc9df /t/t2028-worktree-move.sh | |
parent | 58142c09a4fe825912e5a2ebfa1ba5f7f6d8beb5 (diff) | |
download | git-6d308627cae4d34c058591de73ce14a52b79cf4e.tar.gz |
worktree: add "unlock" command
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.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 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh index 3a8512c030..8298aaf97f 100755 --- a/t/t2028-worktree-move.sh +++ b/t/t2028-worktree-move.sh @@ -45,4 +45,18 @@ test_expect_success 'lock worktree twice (from the locked worktree)' ' test_cmp expected .git/worktrees/source/locked ' +test_expect_success 'unlock main worktree' ' + test_must_fail git worktree unlock . +' + +test_expect_success 'unlock linked worktree' ' + git worktree unlock source && + test_path_is_missing .git/worktrees/source/locked +' + +test_expect_success 'unlock worktree twice' ' + test_must_fail git worktree unlock source && + test_path_is_missing .git/worktrees/source/locked +' + test_done |