git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Peter Kaestle <peter.kaestle@nokia.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com, pc44800@gmail.com
Subject: Re: [PATCH v3 1/2] Testcase for submodule status on empty dirs
Date: Fri, 24 Jan 2020 09:35:46 -0800	[thread overview]
Message-ID: <xmqq7e1g3ggd.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <1579862044-29847-1-git-send-email-peter.kaestle@nokia.com> (Peter Kaestle's message of "Fri, 24 Jan 2020 11:34:03 +0100")

Peter Kaestle <peter.kaestle@nokia.com> writes:

> Subject: Re: [PATCH v3 1/2] Testcase for submodule status on empty dirs
>
> Test that submodule status reports initialized but not cloned
> submodules as missing.

Let's not waste the findings you made and the description you wrote
during the review of the previous round.  After all, the reason why
reviewers ask questions and you write responses is not because we
want to satisify curiosity of the reviewers, but to polish the
history we leave to the future readers, both in the patch text and
its explanations.

How about explaining this step more like this?

    Subject: t7400: add a testcase for submodule status on empty dirs

    We have test coverage for "git submodule status" output in
    various cases, i.e.

        1) not-init, not-cloned: status should initially be "missing"
        2) init, not-cloned: status should be "missing"
        3) not-init, cloned:
        4) init, cloned:'status should be "up-to-date" after update
        4.1) + modified: status should be "modified" after submodule commit
        4.2) + modified, committed: status should be "up-to-date" after update

    but the cases 2) and 3) are not covered.

    Test that submodule status reports initialized but not cloned
    submodules as missing to fill the gap in test coverage.

Thanks.


>
> Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com>
> ---
>  t/t7400-submodule-basic.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
> index 7f75bb1..2e84914 100755
> --- a/t/t7400-submodule-basic.sh
> +++ b/t/t7400-submodule-basic.sh
> @@ -399,6 +399,14 @@ test_expect_success 'init should register submodule url in .git/config' '
>  	test_cmp expect url
>  '
>  
> +test_expect_success 'status should still be "missing" after initializing' '
> +	rm -fr init &&
> +	mkdir init &&
> +	git submodule status >lines &&
> +	rm -fr init &&
> +	grep "^-$rev1" lines
> +'
> +
>  test_failure_with_unknown_submodule () {
>  	test_must_fail git submodule $1 no-such-submodule 2>output.err &&
>  	test_i18ngrep "^error: .*no-such-submodule" output.err

  parent reply	other threads:[~2020-01-24 17:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 14:02 [PATCH] Fix submodule status of dirs initialized but empty Peter Kästle
2020-01-21 10:12 ` [PATCH v2] Fix status of initialized but not cloned submodules Peter Kaestle
2020-01-23 21:12   ` Junio C Hamano
2020-01-24 10:34     ` [PATCH v3 1/2] Testcase for submodule status on empty dirs Peter Kaestle
2020-01-24 10:34       ` [PATCH v3 2/2] Fix status of initialized but not cloned submodules Peter Kaestle
2020-01-24 17:35       ` Junio C Hamano [this message]
2020-01-27  9:06         ` [PATCH v4 1/2] t7400: add a testcase for submodule status on empty dirs Peter Kaestle
2020-01-27  9:06           ` [PATCH v4 2/2] Fix status of initialized but not cloned submodules Peter Kaestle
2020-01-27 18:15           ` [PATCH v4 1/2] t7400: add a testcase for submodule status on empty dirs Junio C Hamano
2020-01-28  8:16             ` Peter Kästle
2020-02-02 23:32             ` [PATCH] t7400: testcase for submodule status on unregistered inner git repos Peter Kaestle
2020-01-24 11:55     ` [PATCH v2] Fix status of initialized but not cloned submodules Peter Kästle
2020-01-24 17:16       ` Junio C Hamano
2020-01-27  8:52         ` Peter Kästle
2020-01-27 18:18           ` Junio C Hamano
2020-02-02 23:16         ` Peter Kästle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7e1g3ggd.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pc44800@gmail.com \
    --cc=peter.kaestle@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).