{"thread":{"id":"48699","subject":"[PATCH] t7400: encapsulate setup code in test_expect_success","startedAt":"2018-06-12T21:25:50Z","lastAt":"2018-06-18T23:41:57Z","messageCount":3,"participants":["Stefan Beller","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"350024","messageId":"20180612212540.200142-1-sbeller@google.com","threadId":"48699","inReplyTo":null,"subject":"[PATCH] t7400: encapsulate setup code in test_expect_success","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-06-12T21:25:40Z","receivedAt":"2018-06-12T21:25:50Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"When running t7400 in a shell you observe more output than expected:\n\n    ...\n    ok 8 - setup - hide init subdirectory\n    ok 9 - setup - repository to add submodules to\n    ok 10 - submodule add\n    [master (root-commit) d79ce16] one\n     Author: A U Thor <author@example.com>\n     1 file changed, 1 insertion(+)\n     create mode 100644 one.t\n    ok 11 - redirected submodule add does not show progress\n    ok 12 - redirected submodule add --progress does show progress\n    ok 13 - submodule add to .gitignored path fails\n    ...\n\nFix the output by encapsulating the setup code in test_expect_success\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n t/t7400-submodule-basic.sh | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 1a33040d94d..c6e1f749639 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -126,8 +126,10 @@ test_expect_success 'submodule add' '\n \ttest_cmp empty untracked\n '\n \n-test_create_repo parent &&\n-test_commit -C parent one\n+test_expect_success 'setup parent and one repository for further tests' '\n+\ttest_create_repo parent &&\n+\ttest_commit -C parent one\n+'\n \n test_expect_success 'redirected submodule add does not show progress' '\n \tgit -C addtest submodule add \"file://$submodurl/parent\" submod-redirected \\\n-- \n2.18.0.rc1.244.gcf134e6275-goog\n\n"},{"id":"350026","messageId":"CAPig+cQM-DXc3sK_Eb7xaaTxNk=0yu9Q3oYtx7M4EinS04AYHA@mail.gmail.com","threadId":"48699","inReplyTo":"20180612212540.200142-1-sbeller@google.com","subject":"Re: [PATCH] t7400: encapsulate setup code in test_expect_success","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-06-12T21:36:25Z","receivedAt":"2018-06-12T21:36:29Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Jun 12, 2018 at 5:25 PM, Stefan Beller <sbeller@google.com> wrote:\n> When running t7400 in a shell you observe more output than expected:\n>     ...\n>     ok 10 - submodule add\n>     [master (root-commit) d79ce16] one\n>      Author: A U Thor <author@example.com>\n>      1 file changed, 1 insertion(+)\n>      create mode 100644 one.t\n>     ok 11 - redirected submodule add does not show progress\n>     ...\n> Fix the output by encapsulating the setup code in test_expect_success\n>\n> Signed-off-by: Stefan Beller <sbeller@google.com>\n> ---\n> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\n> @@ -126,8 +126,10 @@ test_expect_success 'submodule add' '\n> -test_create_repo parent &&\n> -test_commit -C parent one\n> +test_expect_success 'setup parent and one repository for further tests' '\n\nNit: \"for further tests\" is implied for actions performed by a \"setup\"\nfunction, so a bit redundant to say so.\n\n> +       test_create_repo parent &&\n> +       test_commit -C parent one\n> +'\n"},{"id":"350436","messageId":"20180618234148.205439-1-sbeller@google.com","threadId":"48699","inReplyTo":"CAPig+cQM-DXc3sK_Eb7xaaTxNk=0yu9Q3oYtx7M4EinS04AYHA@mail.gmail.com","subject":"[PATCH] t7400: encapsulate setup code in test_expect_success","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-06-18T23:41:48Z","receivedAt":"2018-06-18T23:41:57Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"When running t7400 in a shell you observe more output than expected:\n\n    ...\n    ok 8 - setup - hide init subdirectory\n    ok 9 - setup - repository to add submodules to\n    ok 10 - submodule add\n    [master (root-commit) d79ce16] one\n     Author: A U Thor <author@example.com>\n     1 file changed, 1 insertion(+)\n     create mode 100644 one.t\n    ok 11 - redirected submodule add does not show progress\n    ok 12 - redirected submodule add --progress does show progress\n    ok 13 - submodule add to .gitignored path fails\n    ...\n\nFix the output by encapsulating the setup code in test_expect_success\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n t/t7400-submodule-basic.sh | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 2f532529b82..812db137b8d 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -126,8 +126,10 @@ test_expect_success 'submodule add' '\n \ttest_cmp empty untracked\n '\n \n-test_create_repo parent &&\n-test_commit -C parent one\n+test_expect_success 'setup parent and one repository' '\n+\ttest_create_repo parent &&\n+\ttest_commit -C parent one\n+'\n \n test_expect_success 'redirected submodule add does not show progress' '\n \tgit -C addtest submodule add \"file://$submodurl/parent\" submod-redirected \\\n-- \n2.18.0.rc1.244.gcf134e6275-goog\n\n"}]}