Skip to content

Commit a8122c8

Browse files
dschogitster
authored andcommitted
fixup! worktree move: new command
This is required for the test to pass on Windows, where $TRASH_DIRECTORY is a POSIX path, while Git works with Windows paths instead. Using `$(pwd)` is the common workaround: it reports a Windows path (while `$PWD` would report the POSIX equivalent which, however, would only be understood by shell and Perl scripts). Duy, if you re-roll the `worktree-move` patch series, would you terribly mind squashing this in? Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e5441ba commit a8122c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

t/t2028-worktree-move.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ test_expect_success 'move locked worktree' '
7171
'
7272

7373
test_expect_success 'move worktree' '
74+
toplevel="$(pwd)" &&
7475
git worktree move source destination &&
7576
test_path_is_missing source &&
7677
git worktree list --porcelain | grep "^worktree" >actual &&
7778
cat <<-EOF >expected &&
78-
worktree $TRASH_DIRECTORY
79-
worktree $TRASH_DIRECTORY/destination
80-
worktree $TRASH_DIRECTORY/elsewhere
79+
worktree $toplevel
80+
worktree $toplevel/destination
81+
worktree $toplevel/elsewhere
8182
EOF
8283
test_cmp expected actual &&
8384
git -C destination log --format=%s >actual2 &&

0 commit comments

Comments
 (0)