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 <johannes.schindelin@gmx.de> Signed-off-by: Hariom Verma <hariom18599@gmail.com> Acked-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hariom Verma committed
Mar 4, 2020 at 07:00 UTC
4d864895a23bbbb5403d9aa8a65d0576d2029597
1 file changed
+6
t/t2402-worktree-list.sh
+6
@@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
151
test_cmp expected sorted/main/actual
152
'
153
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
+
160
test_done