merge-recursive: make "CONFLICT (rename/delete)" message show both paths
[gitweb.git] / t / t2027-worktree-list.sh
index 98b5f340e5b58136dea9a6a89f5d78295e902801..465eeeacd3de1971c7256c84583377b3b47d520b 100755 (executable)
@@ -117,4 +117,23 @@ test_expect_success 'broken main worktree still at the top' '
        )
 '
 
+test_expect_success 'linked worktrees are sorted' '
+       mkdir sorted &&
+       git init sorted/main &&
+       (
+               cd sorted/main &&
+               test_tick &&
+               test_commit new &&
+               git worktree add ../first &&
+               git worktree add ../second &&
+               git worktree list --porcelain | grep ^worktree >actual
+       ) &&
+       cat >expected <<-EOF &&
+       worktree $(pwd)/sorted/main
+       worktree $(pwd)/sorted/first
+       worktree $(pwd)/sorted/second
+       EOF
+       test_cmp expected sorted/main/actual
+'
+
 test_done