From: Hariom Verma Date: Wed, 4 Mar 2020 07:00:00 +0000 (+0000) Subject: t2402: test worktree path when called in .git directory X-Git-Tag: v2.26.0-rc0~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d864895a23bbbb5403d9aa8a65d0576d2029597;p=thirdparty%2Fgit.git 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 Signed-off-by: Hariom Verma Acked-by: Eric Sunshine Signed-off-by: Junio C Hamano --- diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh index bb6fb9b12c..69ffe865b4 100755 --- a/t/t2402-worktree-list.sh +++ b/t/t2402-worktree-list.sh @@ -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