summaryrefslogtreecommitdiff
path: root/t/t2028-worktree-move.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2028-worktree-move.sh')
-rwxr-xr-xt/t2028-worktree-move.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t2028-worktree-move.sh b/t/t2028-worktree-move.sh
index 0f8abc0..deb486c 100755
--- a/t/t2028-worktree-move.sh
+++ b/t/t2028-worktree-move.sh
@@ -85,4 +85,15 @@ test_expect_success 'move main worktree' '
test_must_fail git worktree move . def
'
+test_expect_success 'move worktree to another dir' '
+ toplevel="$(pwd)" &&
+ mkdir some-dir &&
+ git worktree move destination some-dir &&
+ test_path_is_missing source &&
+ git worktree list --porcelain | grep "^worktree.*/some-dir/destination" &&
+ git -C some-dir/destination log --format=%s >actual2 &&
+ echo init >expected2 &&
+ test_cmp expected2 actual2
+'
+
test_done