summaryrefslogtreecommitdiff
path: root/t/t2028-worktree-move.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-06-13 12:18:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-08 22:31:04 (GMT)
commit6d308627cae4d34c058591de73ce14a52b79cf4e (patch)
tree9d87bb41ad8390127869ed99a4fd453886acc9df /t/t2028-worktree-move.sh
parent58142c09a4fe825912e5a2ebfa1ba5f7f6d8beb5 (diff)
downloadgit-6d308627cae4d34c058591de73ce14a52b79cf4e.zip
git-6d308627cae4d34c058591de73ce14a52b79cf4e.tar.gz
git-6d308627cae4d34c058591de73ce14a52b79cf4e.tar.bz2
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-xt/t2028-worktree-move.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh
index 3a8512c..8298aaf 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