{"thread":{"id":"52935","subject":"[PATCH] t2402: test worktree path when called in .git directory","startedAt":"2020-03-04T07:00:06Z","lastAt":"2020-03-04T16:20:12Z","messageCount":3,"participants":["Hariom Verma via GitGitGadget","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"392839","messageId":"pull.570.git.1583305200143.gitgitgadget@gmail.com","threadId":"52935","inReplyTo":null,"subject":"[PATCH] t2402: test worktree path when called in .git directory","fromName":"Hariom Verma via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-03-04T07:00:00Z","receivedAt":"2020-03-04T07:00:06Z","isPatch":true,"sender":{"key":"name:Hariom Verma","avatar":null},"body":"From: Hariom Verma <hariom18599@gmail.com>\n\nThe bug which reports an extra `/.git/.` in worktree path when called in\n'.git' directory already has been fixed. But unfortunately, the regression\ntest to ensure this behavior has been forgotten.\nHere is that test.\n\nHelped-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Hariom Verma <hariom18599@gmail.com>\n---\n    t2402: test worktree path when called in .git directory\n    \n    Regression test to ensure that the bug (i.e. extra /.git/. in worktree\n    path when called in '.git' directory) has been fixed correctly.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-570%2Fharry-hov%2Fverify-get_main_worktree-fix-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-570/harry-hov/verify-get_main_worktree-fix-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/570\n\n t/t2402-worktree-list.sh | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\nindex bb6fb9b12cb..ef397386dc7 100755\n--- a/t/t2402-worktree-list.sh\n+++ b/t/t2402-worktree-list.sh\n@@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '\n \ttest_cmp expected sorted/main/actual\n '\n \n+test_expect_success 'worktree path when called in .git directory' '\n+\tgit worktree list> list1 &&\n+\tgit -C .git worktree list> list2 &&\n+\ttest_cmp list1 list2\n+'\n+\n test_done\n\nbase-commit: 4ef346482d6d5748861c1aa9d56712e847369b40\n-- \ngitgitgadget\n"},{"id":"392840","messageId":"CAPig+cRBNHX516_cQ_G-2azL61xOo5ndOHV_E-OmQ4XvpwBffQ@mail.gmail.com","threadId":"52935","inReplyTo":"pull.570.git.1583305200143.gitgitgadget@gmail.com","subject":"Re: [PATCH] t2402: test worktree path when called in .git directory","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-03-04T08:15:05Z","receivedAt":"2020-03-04T08:15:20Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Mar 4, 2020 at 2:00 AM Hariom Verma via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> The bug which reports an extra `/.git/.` in worktree path when called in\n> '.git' directory already has been fixed. But unfortunately, the regression\n> test to ensure this behavior has been forgotten.\n> Here is that test.\n\nFor readers not involved in the discussion, this test was requested by\n[1], but the topic graduated to \"next\" before it could be re-rolled.\nIt probably ought to be queued atop\n'hv/receive-denycurrent-everywhere'.\n\n[1]: https://lore.kernel.org/git/CAPig+cTh-uu-obh9aeDOV9ptbVwRmkujgucbu9ei1Qa3qSNG_A@mail.gmail.com/\n\n> Signed-off-by: Hariom Verma <hariom18599@gmail.com>\n> ---\n> diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\n> @@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '\n> +test_expect_success 'worktree path when called in .git directory' '\n> +       git worktree list> list1 &&\n> +       git -C .git worktree list> list2 &&\n\nNit: Style is for the redirection operator to stick to the file:\n\n    git worktree list >list1 &&\n    git -C .git worktree list >list2 &&\n\n> +       test_cmp list1 list2\n> +'\n\nThe test itself makes sense.\n"},{"id":"392861","messageId":"xmqqlfog5byl.fsf@gitster-ct.c.googlers.com","threadId":"52935","inReplyTo":"CAPig+cRBNHX516_cQ_G-2azL61xOo5ndOHV_E-OmQ4XvpwBffQ@mail.gmail.com","subject":"Re: [PATCH] t2402: test worktree path when called in .git directory","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-04T16:20:02Z","receivedAt":"2020-03-04T16:20:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Wed, Mar 4, 2020 at 2:00 AM Hariom Verma via GitGitGadget\n> <gitgitgadget@gmail.com> wrote:\n>> The bug which reports an extra `/.git/.` in worktree path when called in\n>> '.git' directory already has been fixed. But unfortunately, the regression\n>> test to ensure this behavior has been forgotten.\n>> Here is that test.\n>\n> For readers not involved in the discussion, this test was requested by\n> [1], but the topic graduated to \"next\" before it could be re-rolled.\n> It probably ought to be queued atop\n> 'hv/receive-denycurrent-everywhere'.\n>\n> [1]: https://lore.kernel.org/git/CAPig+cTh-uu-obh9aeDOV9ptbVwRmkujgucbu9ei1Qa3qSNG_A@mail.gmail.com/\n\nYour notes to those watching from sidelines are greatly appreciated.\n\n>> Signed-off-by: Hariom Verma <hariom18599@gmail.com>\n>> ---\n>> diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh\n>> @@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '\n>> +test_expect_success 'worktree path when called in .git directory' '\n>> +       git worktree list> list1 &&\n>> +       git -C .git worktree list> list2 &&\n>\n> Nit: Style is for the redirection operator to stick to the file:\n\n;-)  Thanks for being a careful reader.\n\n>     git worktree list >list1 &&\n>     git -C .git worktree list >list2 &&\n>\n>> +       test_cmp list1 list2\n>> +'\n>\n> The test itself makes sense.\n\n"}]}