* [PATCH] t2402: test worktree path when called in .git directory
@ 2020-03-04 7:00 Hariom Verma via GitGitGadget
2020-03-04 8:15 ` Eric Sunshine
0 siblings, 1 reply; 3+ messages in thread
From: Hariom Verma via GitGitGadget @ 2020-03-04 7:00 UTC (permalink / raw)
To: git; +Cc: Hariom Verma, Hariom Verma
From: Hariom Verma <hariom18599@gmail.com>
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>
---
t2402: test worktree path when called in .git directory
Regression test to ensure that the bug (i.e. extra /.git/. in worktree
path when called in '.git' directory) has been fixed correctly.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-570%2Fharry-hov%2Fverify-get_main_worktree-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-570/harry-hov/verify-get_main_worktree-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/570
t/t2402-worktree-list.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index bb6fb9b12cb..ef397386dc7 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
base-commit: 4ef346482d6d5748861c1aa9d56712e847369b40
--
gitgitgadget
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] t2402: test worktree path when called in .git directory
2020-03-04 7:00 [PATCH] t2402: test worktree path when called in .git directory Hariom Verma via GitGitGadget
@ 2020-03-04 8:15 ` Eric Sunshine
2020-03-04 16:20 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sunshine @ 2020-03-04 8:15 UTC (permalink / raw)
To: Hariom Verma via GitGitGadget; +Cc: Git List, Hariom Verma
On Wed, Mar 4, 2020 at 2:00 AM Hariom Verma via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> 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.
For readers not involved in the discussion, this test was requested by
[1], but the topic graduated to "next" before it could be re-rolled.
It probably ought to be queued atop
'hv/receive-denycurrent-everywhere'.
[1]: https://lore.kernel.org/git/CAPig+cTh-uu-obh9aeDOV9ptbVwRmkujgucbu9ei1Qa3qSNG_A@mail.gmail.com/
> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
> ---
> diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
> @@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
> +test_expect_success 'worktree path when called in .git directory' '
> + git worktree list> list1 &&
> + git -C .git worktree list> list2 &&
Nit: Style is for the redirection operator to stick to the file:
git worktree list >list1 &&
git -C .git worktree list >list2 &&
> + test_cmp list1 list2
> +'
The test itself makes sense.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] t2402: test worktree path when called in .git directory
2020-03-04 8:15 ` Eric Sunshine
@ 2020-03-04 16:20 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2020-03-04 16:20 UTC (permalink / raw)
To: Eric Sunshine; +Cc: Hariom Verma via GitGitGadget, Git List, Hariom Verma
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Wed, Mar 4, 2020 at 2:00 AM Hariom Verma via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>> 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.
>
> For readers not involved in the discussion, this test was requested by
> [1], but the topic graduated to "next" before it could be re-rolled.
> It probably ought to be queued atop
> 'hv/receive-denycurrent-everywhere'.
>
> [1]: https://lore.kernel.org/git/CAPig+cTh-uu-obh9aeDOV9ptbVwRmkujgucbu9ei1Qa3qSNG_A@mail.gmail.com/
Your notes to those watching from sidelines are greatly appreciated.
>> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
>> ---
>> diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
>> @@ -151,4 +151,10 @@ test_expect_success 'linked worktrees are sorted' '
>> +test_expect_success 'worktree path when called in .git directory' '
>> + git worktree list> list1 &&
>> + git -C .git worktree list> list2 &&
>
> Nit: Style is for the redirection operator to stick to the file:
;-) Thanks for being a careful reader.
> git worktree list >list1 &&
> git -C .git worktree list >list2 &&
>
>> + test_cmp list1 list2
>> +'
>
> The test itself makes sense.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-04 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 7:00 [PATCH] t2402: test worktree path when called in .git directory Hariom Verma via GitGitGadget
2020-03-04 8:15 ` Eric Sunshine
2020-03-04 16:20 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).