{"thread":{"id":"61027","subject":"[PATCH] tests: modernize the test script t0010-racy-git.sh","startedAt":"2024-02-29T12:23:58Z","lastAt":"2024-03-07T18:34:06Z","messageCount":18,"participants":["Aryan Gupta via GitGitGadget","Eric Sunshine","Junio C Hamano","Christian Couder","Aryan Gupta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"489660","messageId":"pull.1675.git.1709209435242.gitgitgadget@gmail.com","threadId":"61027","inReplyTo":null,"subject":"[PATCH] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-02-29T12:23:55Z","receivedAt":"2024-02-29T12:23:58Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"From: aryangupta701 <garyan447@gmail.com>\n\nModernize the formatting of the test script to align with current\nstandards and improve its overall readability.\n\nSigned-off-by: Aryan Gupta <garyan447@gmail.com>\n---\n    [GSOC] [PATCH] Modernize a test script\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1675\n\n t/t0010-racy-git.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\nindex 837c8b7228b..04dc1cf3ff5 100755\n--- a/t/t0010-racy-git.sh\n+++ b/t/t0010-racy-git.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='racy GIT'\n+test_description='racy git'\n \n TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n@@ -16,19 +16,18 @@ do\n \techo xyzzy >infocom\n \n \tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part A\" \\\n-\t'test \"\" != \"$files\"'\n+\ttest_expect_success 'Racy git trial #$trial part A' '\n+\t\ttest \"\" != \"$files\"\n+\t'\n \n \tsleep 1\n \techo xyzzy >cornerstone\n \tgit update-index --add cornerstone\n \n \tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part B\" \\\n-\t'test \"\" != \"$files\"'\n-\n+\ttest_expect_success 'Racy git trial #$trial part B' '\n+\t\ttest \"\" != \"$files\"\n+\t'\n done\n \n test_done\n\nbase-commit: 3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0\n-- \ngitgitgadget\n"},{"id":"489671","messageId":"CAPig+cS5L=i2dYJnc+w5F-k0nSpOjdpqyk6T0gL7i0c01A40nQ@mail.gmail.com","threadId":"61027","inReplyTo":"pull.1675.git.1709209435242.gitgitgadget@gmail.com","subject":"Re: [PATCH] tests: modernize the test script t0010-racy-git.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-02-29T18:11:46Z","receivedAt":"2024-02-29T18:11:59Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 29, 2024 at 7:24 AM Aryan Gupta via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> From: aryangupta701 <garyan447@gmail.com>\n\nThe name in the \"From:\" header should match the name in the\n\"Signed-off-by:\" trailer.\n\n> Modernize the formatting of the test script to align with current\n> standards and improve its overall readability.\n\nThe aim of this patch makes sense, but the implementation isn't quite correct.\n\n> Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n> ---\n> diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh> @@ -16,19 +16,18 @@ do\n>         files=$(git diff-files -p)\n> -       test_expect_success \\\n> -       \"Racy GIT trial #$trial part A\" \\\n> -       'test \"\" != \"$files\"'\n> +       test_expect_success 'Racy git trial #$trial part A' '\n> +               test \"\" != \"$files\"\n> +       '\n\nThe variable `trial` takes on values 0-4, and that value is meant to\nappear in the test title as the script runs:\n\n    Racy GIT trial #0 part A\n    Racy GIT trial #0 part B\n    Racy GIT trial #1 part A\n    Racy GIT trial #1 part B\n    ...\n\nHowever, by changing the title from a double-quote string to a\nsingle-quote string, you inhibit interpolation of the `trial` variable\ninto the title, hence the test titles instead show up as:\n\n    Racy GIT trial #$trial part A\n    Racy GIT trial #$trial part B\n    Racy GIT trial #$trial part A\n    Racy GIT trial #$trial part B\n\nwhich is undesirable.\n\nSo, the title should continue using double-quotes, and not be changed\nto single-quotes.\n\nThe other change, which fixes the style of the test's body, appears correct.\n"},{"id":"489694","messageId":"pull.1675.v2.git.1709243831190.gitgitgadget@gmail.com","threadId":"61027","inReplyTo":"pull.1675.git.1709209435242.gitgitgadget@gmail.com","subject":"[PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-02-29T21:57:11Z","receivedAt":"2024-02-29T21:57:14Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"From: Aryan Gupta <garyan447@gmail.com>\n\nModernize the formatting of the test script to align with current\nstandards and improve its overall readability.\n\nSigned-off-by: Aryan Gupta <garyan447@gmail.com>\n---\n    [GSOC][PATCH] Modernize a test script\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1675\n\nRange-diff vs v1:\n\n 1:  06377119ea3 ! 1:  fa381d0b57a tests: modernize the test script t0010-racy-git.sh\n     @@\n       ## Metadata ##\n     -Author: aryangupta701 <garyan447@gmail.com>\n     +Author: Aryan Gupta <garyan447@gmail.com>\n      \n       ## Commit message ##\n          tests: modernize the test script t0010-racy-git.sh\n     @@ t/t0010-racy-git.sh: do\n      -\ttest_expect_success \\\n      -\t\"Racy GIT trial #$trial part A\" \\\n      -\t'test \"\" != \"$files\"'\n     -+\ttest_expect_success 'Racy git trial #$trial part A' '\n     ++\ttest_expect_success \"Racy git trial #$trial part A\" '\n      +\t\ttest \"\" != \"$files\"\n      +\t'\n       \n     @@ t/t0010-racy-git.sh: do\n      -\t\"Racy GIT trial #$trial part B\" \\\n      -\t'test \"\" != \"$files\"'\n      -\n     -+\ttest_expect_success 'Racy git trial #$trial part B' '\n     ++\ttest_expect_success \"Racy git trial #$trial part B\" '\n      +\t\ttest \"\" != \"$files\"\n      +\t'\n       done\n\n\n t/t0010-racy-git.sh | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\nindex 837c8b7228b..2ceac06c9c2 100755\n--- a/t/t0010-racy-git.sh\n+++ b/t/t0010-racy-git.sh\n@@ -1,6 +1,6 @@\n #!/bin/sh\n \n-test_description='racy GIT'\n+test_description='racy git'\n \n TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n@@ -16,19 +16,18 @@ do\n \techo xyzzy >infocom\n \n \tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part A\" \\\n-\t'test \"\" != \"$files\"'\n+\ttest_expect_success \"Racy git trial #$trial part A\" '\n+\t\ttest \"\" != \"$files\"\n+\t'\n \n \tsleep 1\n \techo xyzzy >cornerstone\n \tgit update-index --add cornerstone\n \n \tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part B\" \\\n-\t'test \"\" != \"$files\"'\n-\n+\ttest_expect_success \"Racy git trial #$trial part B\" '\n+\t\ttest \"\" != \"$files\"\n+\t'\n done\n \n test_done\n\nbase-commit: 3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0\n-- \ngitgitgadget\n"},{"id":"489695","messageId":"CAPig+cReJYnKBg=CV_zho3dTTJ8rQ8HLHFz5_ogFYuobhU4REw@mail.gmail.com","threadId":"61027","inReplyTo":"pull.1675.v2.git.1709243831190.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-02-29T22:19:02Z","receivedAt":"2024-02-29T22:19:14Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 29, 2024 at 4:57 PM Aryan Gupta via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> Modernize the formatting of the test script to align with current\n> standards and improve its overall readability.\n>\n> Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n> ---\n> diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\n> @@ -16,19 +16,18 @@ do\n>         files=$(git diff-files -p)\n> -       test_expect_success \\\n> -       \"Racy GIT trial #$trial part A\" \\\n> -       'test \"\" != \"$files\"'\n> +       test_expect_success \"Racy git trial #$trial part A\" '\n> +               test \"\" != \"$files\"\n> +       '\n\nThis version (v2) addresses my review comments about v1. Thanks.\n"},{"id":"489701","messageId":"xmqqle72c17i.fsf@gitster.g","threadId":"61027","inReplyTo":"pull.1675.v2.git.1709243831190.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-29T23:14:41Z","receivedAt":"2024-02-29T23:14:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Aryan Gupta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Aryan Gupta <garyan447@gmail.com>\n>\n> Modernize the formatting of the test script to align with current\n> standards and improve its overall readability.\n\nOK.\n\n> diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\n> index 837c8b7228b..2ceac06c9c2 100755\n> --- a/t/t0010-racy-git.sh\n> +++ b/t/t0010-racy-git.sh\n> @@ -1,6 +1,6 @@\n>  #!/bin/sh\n>  \n> -test_description='racy GIT'\n> +test_description='racy git'\n\nThis does not look like updating formatting to the current standard,\nor improving readability, though.\n\n> -\ttest_expect_success \\\n> -\t\"Racy GIT trial #$trial part A\" \\\n> -\t'test \"\" != \"$files\"'\n> +\ttest_expect_success \"Racy git trial #$trial part A\" '\n> +\t\ttest \"\" != \"$files\"\n> +\t'\n> ...\n> -\ttest_expect_success \\\n> -\t\"Racy GIT trial #$trial part B\" \\\n> -\t'test \"\" != \"$files\"'\n> -\n> +\ttest_expect_success \"Racy git trial #$trial part B\" '\n> +\t\ttest \"\" != \"$files\"\n> +\t'\n\nThese are not wrong per-se, but if we are updating, I wonder if we\nwant to get rid of statements outside the test_expect_success block,\nnot just the formatting of individual test_expect_success tests.\n\nLooking at an iteration of the loop, the executable statements from\nhere ...\n\n                rm -f .git/index\n                echo frotz >infocom\n                git update-index --add infocom\n                echo xyzzy >infocom\n\n                files=$(git diff-files -p)\n\n... to here is what we would make part of one test, namely ...\n\n                test_expect_success \\\n                \"Racy GIT trial #$trial part A\" \\\n                'test \"\" != \"$files\"'\n\n... this one.  Then\n\n                sleep 1\n\nis a cricial delay to have before the next test, which we may want\nto have outside to make it clear what is going on to readers.  But\nthe following parts ...\n\n                echo xyzzy >cornerstone\n                git update-index --add cornerstone\n\n                files=$(git diff-files -p)\n\n... up to here, we would make part of the next test ...\n\n                test_expect_success \\\n                \"Racy GIT trial #$trial part B\" \\\n                'test \"\" != \"$files\"'\n\n... in the modern style.\n\nSo, we may want to do it more like this, perhaps?\n\n\ttest_expect_success \"Racy GIT trial #$trial part A\" '\n\t\trm -f .git/index &&\n\t\techo frotz >infocom &&\n\t\tgit update-index --add infocom &&\n\t\techo xyzzy >infocom &&\n\n\t\tfiles=$(git diff-files -p) &&\n                test \"\" != \"$files\"\n\t'\n\n\tsleep 1\n\n\ttest_expect_success \"Racy GIT trial #$trial part B\" '\n\t\techo xyzzy >cornerstone &&\n\t\tgit update-index --add cornerstone &&\n\n\t\tfiles=$(git diff-files -p) &&\n\t\ttest \"\" != \"$files\"\n\t'\n\nAn added benefit of the more modern style to place as much as\npossible to &&-chain in test_expect_success block is that we would\ncatch breakage in \"git update-index\" and other things used to set-up\nthe test as well.  With the original loop, breakages in things\noutside the test_expect_success blocks will go unchecked.\n\n"},{"id":"489703","messageId":"CAPig+cQ5m86=pLTpFrik0xS6XPyK4tZQx_wkc1xh2r9WDFkhuQ@mail.gmail.com","threadId":"61027","inReplyTo":"xmqqle72c17i.fsf@gitster.g","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-02-29T23:22:55Z","receivedAt":"2024-02-29T23:23:07Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 29, 2024 at 6:14 PM Junio C Hamano <gitster@pobox.com> wrote:\n> So, we may want to do it more like this, perhaps?\n>\n>         test_expect_success \"Racy GIT trial #$trial part A\" '\n>                 rm -f .git/index &&\n>                 echo frotz >infocom &&\n>                 git update-index --add infocom &&\n>                 echo xyzzy >infocom &&\n>\n>                 files=$(git diff-files -p) &&\n>                 test \"\" != \"$files\"\n>         '\n\nIf taking it to this extent, then the modernized version of the last\ncouple lines would be:\n\n    git diff-files -p >out &&\n    test_file_not_empty out\n"},{"id":"489704","messageId":"xmqqa5nic06t.fsf@gitster.g","threadId":"61027","inReplyTo":"CAPig+cQ5m86=pLTpFrik0xS6XPyK4tZQx_wkc1xh2r9WDFkhuQ@mail.gmail.com","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-02-29T23:36:42Z","receivedAt":"2024-02-29T23:36:48Z","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 Thu, Feb 29, 2024 at 6:14 PM Junio C Hamano <gitster@pobox.com> wrote:\n>> So, we may want to do it more like this, perhaps?\n>>\n>>         test_expect_success \"Racy GIT trial #$trial part A\" '\n>>                 rm -f .git/index &&\n>>                 echo frotz >infocom &&\n>>                 git update-index --add infocom &&\n>>                 echo xyzzy >infocom &&\n>>\n>>                 files=$(git diff-files -p) &&\n>>                 test \"\" != \"$files\"\n>>         '\n>\n> If taking it to this extent, then the modernized version of the last\n> couple lines would be:\n>\n>     git diff-files -p >out &&\n>     test_file_not_empty out\n\nYes.  The modern style seems to prefer temporary files over\nvariables; the reason probably is because it tends to be easier to\nremotely post-mortem?\n"},{"id":"489705","messageId":"CAPig+cSGtcA15aOmvj07Uv-pFZTE58+9gGsQh=8K4BL4KRieQA@mail.gmail.com","threadId":"61027","inReplyTo":"xmqqa5nic06t.fsf@gitster.g","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-02-29T23:52:14Z","receivedAt":"2024-02-29T23:52:25Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 29, 2024 at 6:36 PM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > If taking it to this extent, then the modernized version of the last\n> > couple lines would be:\n> >\n> >     git diff-files -p >out &&\n> >     test_file_not_empty out\n>\n> Yes.  The modern style seems to prefer temporary files over\n> variables; the reason probably is because it tends to be easier to\n> remotely post-mortem?\n\nYes, that seems likely. Functions such as test_file_not_empty() also\nprovide an immediate indication of what went wrong without having to\nspelunk the test detritus:\n\n    'foo' is not a non-empty file. [*]\n\nwhereas `test \"\" != \"$foo\"` provides no output at all, so it's not\nimmediately clear which part of the test failed. Peff's `verbose`\nfunction was intended to mitigate that problem by making the\nexpression verbose upon failure:\n\n    verbose test \"\" != \"$foo\" &&\n\nbut never really caught on and was eventually retired by 8ddfce7144\n(t: drop \"verbose\" helper function, 2023-05-08).\n\n[*]: Admittedly, the double-negative in \"'foo' is not a non-empty\nfile.\" is more than a little confusing. It probably would have been\nbetter phrased as \"'foo' should be empty but is not\".\n"},{"id":"489708","messageId":"CAPig+cQ+JNBwydUq0CsTZGs8mHs3L3fJDuSosd+-WdKwWWw=gg@mail.gmail.com","threadId":"61027","inReplyTo":"CAPig+cSGtcA15aOmvj07Uv-pFZTE58+9gGsQh=8K4BL4KRieQA@mail.gmail.com","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-03-01T00:06:36Z","receivedAt":"2024-03-01T00:06:48Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Feb 29, 2024 at 6:52 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n> [*]: Admittedly, the double-negative in \"'foo' is not a non-empty\n> file.\" is more than a little confusing. It probably would have been\n> better phrased as \"'foo' should be empty but is not\".\n\nThe double-negative confused me even when suggesting a replacement.\nWhat I meant was that a better phrasing would perhaps have been:\n\n    'foo' is empty but should not be\n"},{"id":"489721","messageId":"xmqqwmqmaeto.fsf@gitster.g","threadId":"61027","inReplyTo":"CAPig+cQ+JNBwydUq0CsTZGs8mHs3L3fJDuSosd+-WdKwWWw=gg@mail.gmail.com","subject":"Re: [PATCH v2] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-01T02:03:31Z","receivedAt":"2024-03-01T02:03:33Z","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> The double-negative confused me even when suggesting a replacement.\n> What I meant was that a better phrasing would perhaps have been:\n>\n>     'foo' is empty but should not be\n\n+1.  Thanks for caring.\n"},{"id":"490024","messageId":"pull.1675.v3.git.1709676557639.gitgitgadget@gmail.com","threadId":"61027","inReplyTo":"pull.1675.v2.git.1709243831190.gitgitgadget@gmail.com","subject":"[PATCH v3] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-05T22:09:17Z","receivedAt":"2024-03-05T22:09:20Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"From: Aryan Gupta <garyan447@gmail.com>\n\nModernize the formatting of the test script to align with current\nstandards and improve its overall readability.\n\nSigned-off-by: Aryan Gupta <garyan447@gmail.com>\n---\n    [GSOC][PATCH] Modernize a test script\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/1675\n\nRange-diff vs v2:\n\n 1:  fa381d0b57a ! 1:  05ee9e8a458 tests: modernize the test script t0010-racy-git.sh\n     @@ Commit message\n          Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n      \n       ## t/t0010-racy-git.sh ##\n     -@@\n     - #!/bin/sh\n     +@@ t/t0010-racy-git.sh: TEST_PASSES_SANITIZE_LEAK=true\n       \n     --test_description='racy GIT'\n     -+test_description='racy git'\n     - \n     - TEST_PASSES_SANITIZE_LEAK=true\n     - . ./test-lib.sh\n     -@@ t/t0010-racy-git.sh: do\n     - \techo xyzzy >infocom\n     - \n     - \tfiles=$(git diff-files -p)\n     + for trial in 0 1 2 3 4\n     + do\n     +-\trm -f .git/index\n     +-\techo frotz >infocom\n     +-\tgit update-index --add infocom\n     +-\techo xyzzy >infocom\n     +-\n     +-\tfiles=$(git diff-files -p)\n      -\ttest_expect_success \\\n      -\t\"Racy GIT trial #$trial part A\" \\\n      -\t'test \"\" != \"$files\"'\n     +-\n      +\ttest_expect_success \"Racy git trial #$trial part A\" '\n     -+\t\ttest \"\" != \"$files\"\n     ++\t\trm -f .git/index &&\n     ++\t\techo frotz >infocom &&\n     ++\t\tgit update-index --add infocom &&\n     ++\t\techo xyzzy >infocom &&\n     ++\n     ++\t\tgit diff-files -p >out &&\n     ++\t\ttest_file_not_empty out\n      +\t'\n     - \n       \tsleep 1\n     - \techo xyzzy >cornerstone\n     - \tgit update-index --add cornerstone\n     +-\techo xyzzy >cornerstone\n     +-\tgit update-index --add cornerstone\n       \n     - \tfiles=$(git diff-files -p)\n     +-\tfiles=$(git diff-files -p)\n      -\ttest_expect_success \\\n      -\t\"Racy GIT trial #$trial part B\" \\\n      -\t'test \"\" != \"$files\"'\n     --\n      +\ttest_expect_success \"Racy git trial #$trial part B\" '\n     -+\t\ttest \"\" != \"$files\"\n     ++\t\techo xyzzy >cornerstone &&\n     ++\t\tgit update-index --add cornerstone &&\n     + \n     ++\t\tgit diff-files -p >out &&\n     ++\t\ttest_file_not_empty out\n      +\t'\n       done\n       \n\n\n t/t0010-racy-git.sh | 31 +++++++++++++++----------------\n 1 file changed, 15 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\nindex 837c8b7228b..84172a37390 100755\n--- a/t/t0010-racy-git.sh\n+++ b/t/t0010-racy-git.sh\n@@ -10,25 +10,24 @@ TEST_PASSES_SANITIZE_LEAK=true\n \n for trial in 0 1 2 3 4\n do\n-\trm -f .git/index\n-\techo frotz >infocom\n-\tgit update-index --add infocom\n-\techo xyzzy >infocom\n-\n-\tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part A\" \\\n-\t'test \"\" != \"$files\"'\n-\n+\ttest_expect_success \"Racy git trial #$trial part A\" '\n+\t\trm -f .git/index &&\n+\t\techo frotz >infocom &&\n+\t\tgit update-index --add infocom &&\n+\t\techo xyzzy >infocom &&\n+\n+\t\tgit diff-files -p >out &&\n+\t\ttest_file_not_empty out\n+\t'\n \tsleep 1\n-\techo xyzzy >cornerstone\n-\tgit update-index --add cornerstone\n \n-\tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part B\" \\\n-\t'test \"\" != \"$files\"'\n+\ttest_expect_success \"Racy git trial #$trial part B\" '\n+\t\techo xyzzy >cornerstone &&\n+\t\tgit update-index --add cornerstone &&\n \n+\t\tgit diff-files -p >out &&\n+\t\ttest_file_not_empty out\n+\t'\n done\n \n test_done\n\nbase-commit: 3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0\n-- \ngitgitgadget\n"},{"id":"490036","messageId":"xmqqh6hkxox6.fsf@gitster.g","threadId":"61027","inReplyTo":"pull.1675.v3.git.1709676557639.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-05T23:02:45Z","receivedAt":"2024-03-05T23:02:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Aryan Gupta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Aryan Gupta <garyan447@gmail.com>\n>\n> Modernize the formatting of the test script to align with current\n> standards and improve its overall readability.\n>\n> Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n> ---\n\nBoth the above proposed commit log message and the proposed changes\nto the code look good.\n\nThis is a tangent but as can be seen at\n\n  https://lore.kernel.org/git/pull.1675.v3.git.1709676557639.gitgitgadget@gmail.com/raw\n\nyour message has these headers that are not syntactically correct\nand may even cause responses to bounce unless editted.\n\n    Cc: \"Patrick Steinhardt [ ]\" <ps@pks.im>,\n        \"Michal =?UTF-8?Q?Such=C3=A1nek?= [ ]\" <msuchanek@suse.de>,\n        \"=?UTF-8?Q?Jean-No=C3=ABl?= AVILA [ ]\" <jn.avila@free.fr>,\n        Kristoffer Haugsbakk <[code@khaugsbakk.name]>,\n        Eric Sunshine <sunshine@sunshineco.com>,\n        Aryan Gupta <garyan447@gmail.com>,\n        Aryan Gupta <garyan447@gmail.com>\n\nI cannot tell if this is a bug in GGG, or a fault of a corrupt pull\nrequest thrown at GGG, but it is annoying that recipients have to\nedit the addresses in e-mail header.  Can somebody take a look into\nit, please (or is it a known issue?).\n\nThanks.\n"},{"id":"490065","messageId":"pull.1675.v4.git.1709716446874.gitgitgadget@gmail.com","threadId":"61027","inReplyTo":"pull.1675.v3.git.1709676557639.gitgitgadget@gmail.com","subject":"[PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-06T09:14:06Z","receivedAt":"2024-03-06T09:14:09Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"From: Aryan Gupta <garyan447@gmail.com>\n\nModernize the formatting of the test script to align with current\nstandards and improve its overall readability.\n\nSigned-off-by: Aryan Gupta <garyan447@gmail.com>\n---\n    [GSOC][PATCH] Modernize a test script\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v4\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v4\nPull-Request: https://github.com/gitgitgadget/git/pull/1675\n\nRange-diff vs v3:\n\n 1:  05ee9e8a458 = 1:  14c7137baea tests: modernize the test script t0010-racy-git.sh\n\n\n t/t0010-racy-git.sh | 31 +++++++++++++++----------------\n 1 file changed, 15 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh\nindex 837c8b7228b..84172a37390 100755\n--- a/t/t0010-racy-git.sh\n+++ b/t/t0010-racy-git.sh\n@@ -10,25 +10,24 @@ TEST_PASSES_SANITIZE_LEAK=true\n \n for trial in 0 1 2 3 4\n do\n-\trm -f .git/index\n-\techo frotz >infocom\n-\tgit update-index --add infocom\n-\techo xyzzy >infocom\n-\n-\tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part A\" \\\n-\t'test \"\" != \"$files\"'\n-\n+\ttest_expect_success \"Racy git trial #$trial part A\" '\n+\t\trm -f .git/index &&\n+\t\techo frotz >infocom &&\n+\t\tgit update-index --add infocom &&\n+\t\techo xyzzy >infocom &&\n+\n+\t\tgit diff-files -p >out &&\n+\t\ttest_file_not_empty out\n+\t'\n \tsleep 1\n-\techo xyzzy >cornerstone\n-\tgit update-index --add cornerstone\n \n-\tfiles=$(git diff-files -p)\n-\ttest_expect_success \\\n-\t\"Racy GIT trial #$trial part B\" \\\n-\t'test \"\" != \"$files\"'\n+\ttest_expect_success \"Racy git trial #$trial part B\" '\n+\t\techo xyzzy >cornerstone &&\n+\t\tgit update-index --add cornerstone &&\n \n+\t\tgit diff-files -p >out &&\n+\t\ttest_file_not_empty out\n+\t'\n done\n \n test_done\n\nbase-commit: 3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0\n-- \ngitgitgadget\n"},{"id":"490182","messageId":"CAP8UFD31udQB2e=+G-LpCevuS+JxQdWqwaq=5qvGEn21595faQ@mail.gmail.com","threadId":"61027","inReplyTo":"pull.1675.v4.git.1709716446874.gitgitgadget@gmail.com","subject":"Re: [PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2024-03-07T13:28:46Z","receivedAt":"2024-03-07T13:29:00Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Wed, Mar 6, 2024 at 10:46 AM Aryan Gupta via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Aryan Gupta <garyan447@gmail.com>\n>\n> Modernize the formatting of the test script to align with current\n> standards and improve its overall readability.\n>\n> Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n> ---\n>     [GSOC][PATCH] Modernize a test script\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v4\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v4\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1675\n>\n> Range-diff vs v3:\n>\n>  1:  05ee9e8a458 = 1:  14c7137baea tests: modernize the test script t0010-racy-git.sh\n\nThis tells us that nothing changed in the patch since v3, so we can\nonly wonder why you sent this v4.\n\nDid you fix some headers? Please explain.\n\n>  t/t0010-racy-git.sh | 31 +++++++++++++++----------------\n>  1 file changed, 15 insertions(+), 16 deletions(-)\n\nOtherwise, the patch looks good to me. Thanks.\n"},{"id":"490184","messageId":"CAMbn=B73boxu1HDy2UHGz83wxnE7=udmbSv4nFsV+ngA0Bn0Sg@mail.gmail.com","threadId":"61027","inReplyTo":"CAP8UFD31udQB2e=+G-LpCevuS+JxQdWqwaq=5qvGEn21595faQ@mail.gmail.com","subject":"Re: [PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta","fromEmail":"garyan447@gmail.com","sentAt":"2024-03-07T14:23:49Z","receivedAt":"2024-03-07T14:24:02Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"On Thu, Mar 7, 2024 at 2:28 PM Christian Couder\n<christian.couder@gmail.com> wrote:\n>\n> On Wed, Mar 6, 2024 at 10:46 AM Aryan Gupta via GitGitGadget\n> <gitgitgadget@gmail.com> wrote:\n> >\n> > From: Aryan Gupta <garyan447@gmail.com>\n> >\n> > Modernize the formatting of the test script to align with current\n> > standards and improve its overall readability.\n> >\n> > Signed-off-by: Aryan Gupta <garyan447@gmail.com>\n> > ---\n> >     [GSOC][PATCH] Modernize a test script\n> >\n> > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1675%2Faryangupta701%2Ftest-modernize-v4\n> > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1675/aryangupta701/test-modernize-v4\n> > Pull-Request: https://github.com/gitgitgadget/git/pull/1675\n> >\n> > Range-diff vs v3:\n> >\n> >  1:  05ee9e8a458 = 1:  14c7137baea tests: modernize the test script t0010-racy-git.sh\n>\n> This tells us that nothing changed in the patch since v3, so we can\n> only wonder why you sent this v4.\n>\n> Did you fix some headers? Please explain.\n>\nHey. Sorry for making a lot of mistakes in my emails.\n\nI thought that there were some bugs in GGG due to which it sent some\nheaders which were not syntactically correct. So I tried sending it again.\nAnd that was the whole purpose of this.\n\n> >  t/t0010-racy-git.sh | 31 +++++++++++++++----------------\n> >  1 file changed, 15 insertions(+), 16 deletions(-)\n>\n> Otherwise, the patch looks good to me. Thanks.\n"},{"id":"490197","messageId":"xmqqjzmdnbz4.fsf@gitster.g","threadId":"61027","inReplyTo":"CAMbn=B73boxu1HDy2UHGz83wxnE7=udmbSv4nFsV+ngA0Bn0Sg@mail.gmail.com","subject":"Re: [PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-07T18:17:03Z","receivedAt":"2024-03-07T18:17:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Aryan Gupta <garyan447@gmail.com> writes:\n\n> I thought that there were some bugs in GGG due to which it sent some\n> headers which were not syntactically correct. So I tried sending it again.\n> And that was the whole purpose of this.\n\nI was wondering about the same thing.  I still see an unwanted \"[ ]\"\naround Kristoffer's e-mail address that will break responding to the\nmessage in your [PATCH v4] e-mail that can be seen at\n\n  https://lore.kernel.org/git/pull.1675.v4.git.1709716446874.gitgitgadget@gmail.com/raw\n\nso, the experiment revealed that it did send some headers were\nbroken.\n\nThanks for a clarification.\n"},{"id":"490198","messageId":"xmqqfrx1nbde.fsf@gitster.g","threadId":"61027","inReplyTo":"xmqqjzmdnbz4.fsf@gitster.g","subject":"Re: [PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-07T18:30:05Z","receivedAt":"2024-03-07T18:30:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I was wondering about the same thing.  I still see an unwanted \"[ ]\"\n> around Kristoffer's e-mail address that will break responding to the\n> message in your [PATCH v4] e-mail that can be seen at\n>\n>   https://lore.kernel.org/git/pull.1675.v4.git.1709716446874.gitgitgadget@gmail.com/raw\n>\n> so, the experiment revealed that it did send some headers were\n> broken.\n\nThis does not necessarily mean GGG is broken.  The majority of the\npatches I see here from GGG are without these funny [square-bracket]\naround addresses at all, and this was the only patch (or it is\npossible that your other patches may have had the same issue; I do\nnot remember) with that problem.  It might be caused by what you\nfeed GGG (e.g., the messages you give it in your pull request) that\ncaused GGG to hiccup, perhaps?\n\n\n"},{"id":"490199","messageId":"CAMbn=B7J4ODf9ybJQpL1bZZ7qdWSDGaLEyTmVv+ZBiSeC9T+yw@mail.gmail.com","threadId":"61027","inReplyTo":"xmqqfrx1nbde.fsf@gitster.g","subject":"Re: [PATCH v4] tests: modernize the test script t0010-racy-git.sh","fromName":"Aryan Gupta","fromEmail":"garyan447@gmail.com","sentAt":"2024-03-07T18:33:53Z","receivedAt":"2024-03-07T18:34:06Z","isPatch":true,"sender":{"key":"garyan447@gmail.com","avatar":"https://avatars.githubusercontent.com/u/87857234?v=4"},"body":"On Thu, Mar 7, 2024 at 7:30 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n> > I was wondering about the same thing.  I still see an unwanted \"[ ]\"\n> > around Kristoffer's e-mail address that will break responding to the\n> > message in your [PATCH v4] e-mail that can be seen at\n> >\n> >   https://lore.kernel.org/git/pull.1675.v4.git.1709716446874.gitgitgadget@gmail.com/raw\n> >\n> > so, the experiment revealed that it did send some headers were\n> > broken.\n>\n> This does not necessarily mean GGG is broken.  The majority of the\n> patches I see here from GGG are without these funny [square-bracket]\n> around addresses at all, and this was the only patch (or it is\n> possible that your other patches may have had the same issue; I do\n> not remember) with that problem.  It might be caused by what you\n> feed GGG (e.g., the messages you give it in your pull request) that\n> caused GGG to hiccup, perhaps?\n>\nOhh yes. I think I got the problem. I have fixed it. Can I try sending\nthe patch again now?\n"}]}