{"thread":{"id":"53531","subject":"[PATCH] t5608: avoid say and use skip_all for consistency","startedAt":"2020-05-21T23:05:32Z","lastAt":"2020-05-24T16:16:57Z","messageCount":4,"participants":["Carlo Marcelo Arenas Belón","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"398408","messageId":"20200521230510.13077-1-carenas@gmail.com","threadId":"53531","inReplyTo":null,"subject":"[PATCH] t5608: avoid say and use skip_all for consistency","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2020-05-21T23:05:10Z","receivedAt":"2020-05-21T23:05:32Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"Printing a message directly to stdout could affect TAP processing\nand is not really needed, as there is a standard way to skip all\ntests that could be used instead (including a message).\n\nWhile at it, update the message to better reflect the use of\nbooleans and get rid of the prerequisite.\n\nSigned-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n---\n t/t5608-clone-2gb.sh | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex eee0842888..4c476d2fa1 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -5,12 +5,11 @@ test_description='Test cloning a repository larger than 2 gigabyte'\n \n if ! test_bool_env GIT_TEST_CLONE_2GB false\n then\n-\tsay 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'\n-else\n-\ttest_set_prereq CLONE_2GB\n+\tskip_all='expensive 2GB clone test; enable with GIT_TEST_CLONE_2GB=true'\n+\ttest_done\n fi\n \n-test_expect_success CLONE_2GB 'setup' '\n+test_expect_success 'setup' '\n \n \tgit config pack.compression 0 &&\n \tgit config pack.depth 0 &&\n@@ -38,13 +37,13 @@ test_expect_success CLONE_2GB 'setup' '\n \n '\n \n-test_expect_success CLONE_2GB 'clone - bare' '\n+test_expect_success 'clone - bare' '\n \n \tgit clone --bare --no-hardlinks . clone-bare\n \n '\n \n-test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '\n+test_expect_success 'clone - with worktree, file:// protocol' '\n \n \tgit clone \"file://$(pwd)\" clone-wt\n \n-- \n2.27.0.rc1.181.g8d5cacc8d1\n\n"},{"id":"398418","messageId":"nycvar.QRO.7.76.6.2005221459190.56@tvgsbejvaqbjf.bet","threadId":"53531","inReplyTo":"20200521230510.13077-1-carenas@gmail.com","subject":"Re: [PATCH] t5608: avoid say and use skip_all for consistency","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-05-22T13:04:23Z","receivedAt":"2020-05-22T13:04:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Carlo,\n\n> Subject : Re: [PATCH] t5608: avoid say and use skip_all for consistency\n\nIt might make quite a bit of sense to add a visual indicator to \"say\" to\nmake it clear that it is not a verb, but a function name. Otherwise\nnon-native speakers such as myself (and maybe even native speakers) will\nstumble over the grammar of this sentence when trying to parse it.\n\nThese would work better for me:\n\n\tt5608: avoid `say` and use `skip_all` for consistency\n\nor\n\n\tt5608: avoid say() and use skip_all() for consistency\n\nOn Thu, 21 May 2020, Carlo Marcelo Arenas Belón wrote:\n\n> Printing a message directly to stdout could affect TAP processing\n> and is not really needed, as there is a standard way to skip all\n> tests that could be used instead (including a message).\n>\n> While at it, update the message to better reflect the use of\n> booleans and get rid of the prerequisite.\n\nMakes sense. I would have added a sentence to say that _all_ three test\ncases were guarded by the very same prereq, so `skip_all` is just much\nfaster and idempotent.\n\nOtherwise, the patch looks good to me.\n\nCiao,\nDscho\n\n>\n> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n> ---\n>  t/t5608-clone-2gb.sh | 11 +++++------\n>  1 file changed, 5 insertions(+), 6 deletions(-)\n>\n> diff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\n> index eee0842888..4c476d2fa1 100755\n> --- a/t/t5608-clone-2gb.sh\n> +++ b/t/t5608-clone-2gb.sh\n> @@ -5,12 +5,11 @@ test_description='Test cloning a repository larger than 2 gigabyte'\n>\n>  if ! test_bool_env GIT_TEST_CLONE_2GB false\n>  then\n> -\tsay 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'\n> -else\n> -\ttest_set_prereq CLONE_2GB\n> +\tskip_all='expensive 2GB clone test; enable with GIT_TEST_CLONE_2GB=true'\n> +\ttest_done\n>  fi\n>\n> -test_expect_success CLONE_2GB 'setup' '\n> +test_expect_success 'setup' '\n>\n>  \tgit config pack.compression 0 &&\n>  \tgit config pack.depth 0 &&\n> @@ -38,13 +37,13 @@ test_expect_success CLONE_2GB 'setup' '\n>\n>  '\n>\n> -test_expect_success CLONE_2GB 'clone - bare' '\n> +test_expect_success 'clone - bare' '\n>\n>  \tgit clone --bare --no-hardlinks . clone-bare\n>\n>  '\n>\n> -test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '\n> +test_expect_success 'clone - with worktree, file:// protocol' '\n>\n>  \tgit clone \"file://$(pwd)\" clone-wt\n>\n> --\n> 2.27.0.rc1.181.g8d5cacc8d1\n>\n>\n"},{"id":"398433","messageId":"20200522184214.40321-1-carenas@gmail.com","threadId":"53531","inReplyTo":"20200521230510.13077-1-carenas@gmail.com","subject":"[PATCH v2] t5608: avoid say() and use \"skip_all\" instead for consistency","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2020-05-22T18:42:14Z","receivedAt":"2020-05-22T18:42:27Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"Printing a message directly to stdout could affect TAP processing\nand is not really needed, as there is a standard way to skip all\ntests that could be used instead, while printing an equivalent\nmessage.\n\nWhile at it; update the message to better reflect that since\na85efb5985 (t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool,\n2019-11-22), the enabling variable should be a recognized boolean\n(ex: true, false, 1, 0) and get rid of the prerequisite that used\nto guard all the tests, since \"skip_all\" is just much faster and\nidempotent.\n\nHelped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n---\nv2:\n* improved commit message (per Johannes)\n\n t/t5608-clone-2gb.sh | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t5608-clone-2gb.sh b/t/t5608-clone-2gb.sh\nindex eee0842888..4c476d2fa1 100755\n--- a/t/t5608-clone-2gb.sh\n+++ b/t/t5608-clone-2gb.sh\n@@ -5,12 +5,11 @@ test_description='Test cloning a repository larger than 2 gigabyte'\n \n if ! test_bool_env GIT_TEST_CLONE_2GB false\n then\n-\tsay 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'\n-else\n-\ttest_set_prereq CLONE_2GB\n+\tskip_all='expensive 2GB clone test; enable with GIT_TEST_CLONE_2GB=true'\n+\ttest_done\n fi\n \n-test_expect_success CLONE_2GB 'setup' '\n+test_expect_success 'setup' '\n \n \tgit config pack.compression 0 &&\n \tgit config pack.depth 0 &&\n@@ -38,13 +37,13 @@ test_expect_success CLONE_2GB 'setup' '\n \n '\n \n-test_expect_success CLONE_2GB 'clone - bare' '\n+test_expect_success 'clone - bare' '\n \n \tgit clone --bare --no-hardlinks . clone-bare\n \n '\n \n-test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '\n+test_expect_success 'clone - with worktree, file:// protocol' '\n \n \tgit clone \"file://$(pwd)\" clone-wt\n \n-- \n2.27.0.rc1.207.gb85828341f\n\n"},{"id":"398471","messageId":"xmqqeer9qpe6.fsf@gitster.c.googlers.com","threadId":"53531","inReplyTo":"nycvar.QRO.7.76.6.2005221459190.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] t5608: avoid say and use skip_all for consistency","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-24T16:16:49Z","receivedAt":"2020-05-24T16:16:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Carlo,\n>\n>> Subject : Re: [PATCH] t5608: avoid say and use skip_all for consistency\n>\n> It might make quite a bit of sense to add a visual indicator to \"say\" to\n> make it clear that it is not a verb, but a function name. Otherwise\n> non-native speakers such as myself (and maybe even native speakers) will\n> stumble over the grammar of this sentence when trying to parse it.\n>\n> These would work better for me:\n>\n> \tt5608: avoid `say` and use `skip_all` for consistency\n>\n> or\n>\n> \tt5608: avoid say() and use skip_all() for consistency\n>\n> On Thu, 21 May 2020, Carlo Marcelo Arenas Belón wrote:\n>\n>> Printing a message directly to stdout could affect TAP processing\n>> and is not really needed, as there is a standard way to skip all\n>> tests that could be used instead (including a message).\n>>\n>> While at it, update the message to better reflect the use of\n>> booleans and get rid of the prerequisite.\n>\n> Makes sense. I would have added a sentence to say that _all_ three test\n> cases were guarded by the very same prereq, so `skip_all` is just much\n> faster and idempotent.\n>\n> Otherwise, the patch looks good to me.\n\nThanks, both.  I see a v2 has already been posted, so hopefully that\nwould be the final version.\n\n\n"}]}