summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHariom Verma <hariom18599@gmail.com>2020-03-04 07:00:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-04 21:28:00 (GMT)
commit4d864895a23bbbb5403d9aa8a65d0576d2029597 (patch)
tree36d20c16ea399450fe49a40763776eb6f41a9641
parent4ef346482d6d5748861c1aa9d56712e847369b40 (diff)
downloadgit-4d864895a23bbbb5403d9aa8a65d0576d2029597.zip
git-4d864895a23bbbb5403d9aa8a65d0576d2029597.tar.gz
git-4d864895a23bbbb5403d9aa8a65d0576d2029597.tar.bz2
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>
-rwxr-xr-xt/t2402-worktree-list.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index bb6fb9b..69ffe86 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