t2402: test worktree path when called in .git directory
authorHariom Verma <redacted>
Wed, 4 Mar 2020 07:00:00 +0000 (07:00 +0000)
committerJunio C Hamano <redacted>
Wed, 4 Mar 2020 21:28:00 +0000 (13:28 -0800)
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 <redacted>
Signed-off-by: Hariom Verma <redacted>
Acked-by: Eric Sunshine <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t2402-worktree-list.sh

index bb6fb9b12cb7f41cea671a7df830ccc97c592e4f..69ffe865b43965bb84bbe60402fc9c03ecc8ba9b 100755 (executable)
@@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
        test_cmp expected sorted/main/actual
 '
 
+test_expect_success 'worktree path when called in .git directory' '
+       git worktree list >list1&&
+       git -C .git worktree list >list2 &&
+       test_cmp list1 list2
+'
+
 test_done
git clone https://git.99rst.org/PROJECT