Skip to content

Commit 4d86489

Browse files
harry-hovgitster
authored andcommitted
t2402: test worktree path when called in .git directory
The bug which reports an extra `/.git/.` in worktree path when called in '.git' directory already has been fixed. But unfortunately, the regression test to ensure this behavior has been forgotten. Here is that test. Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: Hariom Verma <[email protected]> Acked-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4ef3464 commit 4d86489

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t2402-worktree-list.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
151151
test_cmp expected sorted/main/actual
152152
'
153153

154+
test_expect_success 'worktree path when called in .git directory' '
155+
git worktree list >list1&&
156+
git -C .git worktree list >list2 &&
157+
test_cmp list1 list2
158+
'
159+
154160
test_done

0 commit comments

Comments
 (0)