{"thread":{"id":"66572","subject":"[PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts","startedAt":"2026-10-18T04:55:01Z","lastAt":"2026-10-30T08:05:49Z","messageCount":13,"participants":["Srujith A Poojary via GitGitGadget","Usman Akinyemi","Srujith Poojary","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"555341","messageId":"pull.2260.git.1792299301663.gitgitgadget@gmail.com","threadId":"66572","inReplyTo":null,"subject":"[PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-18T04:55:01Z","receivedAt":"2026-10-18T04:55:01Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nAvoid piping output from git version directly into sed to ensure\n\nthat any command failure is properly caught by test scripts.\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    [Outreachy PATCH] t0001: avoid pipes in test scripts\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2260\n\n t/t0001-init.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f1d227f271..e835afee68 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -678,7 +678,7 @@ test_expect_success 'default ref format' '\n \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n \t\tgit init refformat\n \t) &&\n-\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n+\tgit version --build-options >build-options && sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n \ttest_cmp expect actual\n '\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"555802","messageId":"CAPSxiM-Kx1=s45W_cocO+wrcaTaH7qSdqAFBwqJ0rwFAB+k06Q@mail.gmail.com","threadId":"66572","inReplyTo":"pull.2260.git.1792299301663.gitgitgadget@gmail.com","subject":"Re: [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Usman Akinyemi","fromEmail":"usmanakinyemi202@gmail.com","sentAt":"2026-10-21T22:03:57Z","receivedAt":"2026-10-21T22:03:57Z","isPatch":true,"sender":{"key":"usmanakinyemi202@gmail.com","avatar":"https://avatars.githubusercontent.com/u/86585626?v=4"},"body":"> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f1d227f271..e835afee68 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -678,7 +678,7 @@ test_expect_success 'default ref format' '\n>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n>                 git init refformat\n>         ) &&\n> -       git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> +       git version --build-options >build-options && sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\nWe can put this in two lines, something like this:\n\n               git version --build-options >build-options &&\n               sed -ne \"s/^default-ref-storage-format: //p\"\nbuild-options >expect &&\n\n>         git -C refformat rev-parse --show-ref-storage-format >actual &&\n\nThanks for the patch.\n\n"},{"id":"555847","messageId":"pull.2260.v2.git.1792666211685.gitgitgadget@gmail.com","threadId":"66572","inReplyTo":"pull.2260.git.1792299301663.gitgitgadget@gmail.com","subject":"[PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-22T10:50:11Z","receivedAt":"2026-10-22T10:50:11Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nAvoid piping output from git version directly into sed to ensure\n\nthat any command failure is properly caught by test scripts.\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    [Outreachy PATCH] t0001: avoid pipes in test scripts\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2260\n\nRange-diff vs v1:\n\n 1:  92ecaec2cd ! 1:  7d118290ce [Outreachy PATCH] t0001: avoid pipes in test scripts\n     @@ t/t0001-init.sh: test_expect_success 'default ref format' '\n       \t\tgit init refformat\n       \t) &&\n      -\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n     -+\tgit version --build-options >build-options && sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n     ++\tgit version --build-options >build-options &&\n     ++\t\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n       \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n       \ttest_cmp expect actual\n       '\n\n\n t/t0001-init.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f1d227f271..02217a9bf8 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n \t\tgit init refformat\n \t) &&\n-\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n+\tgit version --build-options >build-options &&\n+\t\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n \ttest_cmp expect actual\n '\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"555848","messageId":"CABh_KWhtBBKGn1RMQxqBLLpDh5hMEJwCe_2jCW=nru_wNYFQRg@mail.gmail.com","threadId":"66572","inReplyTo":"pull.2260.v2.git.1792666211685.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-22T10:53:50Z","receivedAt":"2026-10-22T10:53:50Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"Hi Usman,\n\nThanks for the suggestion! I have updated the script to split the\ncommand into two separate lines as recommended and resolved a trailing\nwhitespace issue.\nI've submitted v2 of the patch to the mailing list via GitGitGadget.\n\nBest regards,\nSrujith\n\nOn Thu, Oct 22, 2026 at 4:20 PM Srujith A Poojary via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Srujith Poojary <poojarysrujith@gmail.com>\n>\n> Avoid piping output from git version directly into sed to ensure\n>\n> that any command failure is properly caught by test scripts.\n>\n> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n> ---\n>     [Outreachy PATCH] t0001: avoid pipes in test scripts\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v2\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v2\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2260\n>\n> Range-diff vs v1:\n>\n>  1:  92ecaec2cd ! 1:  7d118290ce [Outreachy PATCH] t0001: avoid pipes in test scripts\n>      @@ t/t0001-init.sh: test_expect_success 'default ref format' '\n>                 git init refformat\n>         ) &&\n>       - git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n>      -+ git version --build-options >build-options && sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>      ++ git version --build-options >build-options &&\n>      ++         sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>         git -C refformat rev-parse --show-ref-storage-format >actual &&\n>         test_cmp expect actual\n>        '\n>\n>\n>  t/t0001-init.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f1d227f271..02217a9bf8 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n>                 git init refformat\n>         ) &&\n> -       git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> +       git version --build-options >build-options &&\n> +               sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>         git -C refformat rev-parse --show-ref-storage-format >actual &&\n>         test_cmp expect actual\n>  '\n>\n> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n> --\n> gitgitgadget\n\n"},{"id":"555884","messageId":"xmqqbj8lhcng.fsf@gitster.g","threadId":"66572","inReplyTo":"pull.2260.v2.git.1792666211685.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-22T17:24:03Z","receivedAt":"2026-10-22T17:24:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Srujith A Poojary via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Srujith Poojary <poojarysrujith@gmail.com>\n>\n> Avoid piping output from git version directly into sed to ensure\n>\n> that any command failure is properly caught by test scripts.\n>\n> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n> ---\n\nYou do not want a blank line in the middle of a sentence.\n\n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f1d227f271..02217a9bf8 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n>  \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n>  \t\tgit init refformat\n>  \t) &&\n> -\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> +\tgit version --build-options >build-options &&\n> +\t\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n\nUnnecessary indentation.  The only reason why you thought it was\nneeded was because the original was (wrongly) expressed as a single\npipeline.  Once that glitch is gone, anybody reading the resulting\ncode has no reason to think that this \"sed\" is associated stronger\nto the previous \"git version\" than with the next \"git rev-parse\"\nline.\n\n>  \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n>  \ttest_cmp expect actual\n>  '\n>\n> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n\n"},{"id":"555941","messageId":"CABh_KWhyZYaXa9Mtfu-XSW7k_KA1BnV31BjDev8wogUoHSjAfg@mail.gmail.com","threadId":"66572","inReplyTo":"xmqqbj8lhcng.fsf@gitster.g","subject":"Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-23T04:34:48Z","receivedAt":"2026-10-23T04:34:48Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"Hi Junio,\n\nThanks for pointing that out! I've removed the extra indentation in v3\nso the sed line aligns properly with the surrounding commands.\n\nBest,\nSrujith\n\n\nOn Thu, Oct 22, 2026 at 10:54 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Srujith A Poojary via GitGitGadget\" <gitgitgadget@gmail.com>\n> writes:\n>\n> > From: Srujith Poojary <poojarysrujith@gmail.com>\n> >\n> > Avoid piping output from git version directly into sed to ensure\n> >\n> > that any command failure is properly caught by test scripts.\n> >\n> > Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n> > ---\n>\n> You do not want a blank line in the middle of a sentence.\n>\n> > diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> > index f1d227f271..02217a9bf8 100755\n> > --- a/t/t0001-init.sh\n> > +++ b/t/t0001-init.sh\n> > @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n> >               sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n> >               git init refformat\n> >       ) &&\n> > -     git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> > +     git version --build-options >build-options &&\n> > +             sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>\n> Unnecessary indentation.  The only reason why you thought it was\n> needed was because the original was (wrongly) expressed as a single\n> pipeline.  Once that glitch is gone, anybody reading the resulting\n> code has no reason to think that this \"sed\" is associated stronger\n> to the previous \"git version\" than with the next \"git rev-parse\"\n> line.\n>\n> >       git -C refformat rev-parse --show-ref-storage-format >actual &&\n> >       test_cmp expect actual\n> >  '\n> >\n> > base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n\n"},{"id":"555946","messageId":"pull.2260.v3.git.1792732388827.gitgitgadget@gmail.com","threadId":"66572","inReplyTo":"pull.2260.git.1792299301663.gitgitgadget@gmail.com","subject":"[PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-23T05:13:08Z","receivedAt":"2026-10-23T05:13:08Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nAvoid piping output from git version directly into sed to ensure\n\nthat any command failure is properly caught by test scripts.\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    [Outreachy PATCH] t0001: avoid pipes in test scripts\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v3\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v3\nPull-Request: https://github.com/gitgitgadget/git/pull/2260\n\nRange-diff vs v2:\n\n 1:  7d118290ce ! 1:  a70ccdf49e [Outreachy PATCH] t0001: avoid pipes in test scripts\n     @@ t/t0001-init.sh: test_expect_success 'default ref format' '\n       \t) &&\n      -\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n      +\tgit version --build-options >build-options &&\n     -+\t\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n     ++\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n       \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n       \ttest_cmp expect actual\n       '\n\n\n t/t0001-init.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f1d227f271..c8c74f681b 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n \t\tgit init refformat\n \t) &&\n-\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n+\tgit version --build-options >build-options &&\n+\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n \ttest_cmp expect actual\n '\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"556074","messageId":"CABh_KWjPyBGYg7sTAg5Y7ik=qkDQJCLRHFfCiOr5O+3=mCYBPg@mail.gmail.com","threadId":"66572","inReplyTo":"pull.2260.v3.git.1792732388827.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-23T16:23:08Z","receivedAt":"2026-10-23T16:23:08Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"Hi,\n\nI have submitted v3 of the t0001 patch to the mailing list.\nJust a quick note on the CI: there is a single failure in win test\n(5), but it is caused by t1051-large-conversion running out of memory\nduring a 5GB conversion test, which is unrelated to the t0001 changes.\n\nThe patch is ready for review.\n\nBest regards,\nSrujith\n\n\n\nOn Fri, Oct 23, 2026 at 10:43 AM Srujith A Poojary via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n>\n> From: Srujith Poojary <poojarysrujith@gmail.com>\n>\n> Avoid piping output from git version directly into sed to ensure\n>\n> that any command failure is properly caught by test scripts.\n>\n> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n> ---\n>     [Outreachy PATCH] t0001: avoid pipes in test scripts\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v3\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v3\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2260\n>\n> Range-diff vs v2:\n>\n>  1:  7d118290ce ! 1:  a70ccdf49e [Outreachy PATCH] t0001: avoid pipes in test scripts\n>      @@ t/t0001-init.sh: test_expect_success 'default ref format' '\n>         ) &&\n>       - git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n>       + git version --build-options >build-options &&\n>      -+         sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>      ++ sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>         git -C refformat rev-parse --show-ref-storage-format >actual &&\n>         test_cmp expect actual\n>        '\n>\n>\n>  t/t0001-init.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f1d227f271..c8c74f681b 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n>                 git init refformat\n>         ) &&\n> -       git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> +       git version --build-options >build-options &&\n> +       sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>         git -C refformat rev-parse --show-ref-storage-format >actual &&\n>         test_cmp expect actual\n>  '\n>\n> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n> --\n> gitgitgadget\n\n"},{"id":"556768","messageId":"auM4FazXNNwLzM3-@pks.im","threadId":"66572","inReplyTo":"pull.2260.v3.git.1792732388827.gitgitgadget@gmail.com","subject":"Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-10-29T12:12:05Z","receivedAt":"2026-10-29T12:12:05Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Fri, Oct 23, 2026 at 05:13:08AM +0000, Srujith A Poojary via GitGitGadget wrote:\n> From: Srujith Poojary <poojarysrujith@gmail.com>\n> \n> Avoid piping output from git version directly into sed to ensure\n> \n> that any command failure is properly caught by test scripts.\n\nFormatting of your commit message is off a bit with an empty line in\nthe middle of the sentence.\n\n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index f1d227f271..c8c74f681b 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n>  \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n>  \t\tgit init refformat\n>  \t) &&\n> -\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> +\tgit version --build-options >build-options &&\n> +\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n>  \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n>  \ttest_cmp expect actual\n>  '\n\nThe changes look good to me though. Thanks!\n\nPatrick\n\n"},{"id":"556794","messageId":"pull.2260.v4.git.1793284463139.gitgitgadget@gmail.com","threadId":"66572","inReplyTo":"pull.2260.git.1792299301663.gitgitgadget@gmail.com","subject":"[PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith A Poojary via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-10-29T14:34:23Z","receivedAt":"2026-10-29T14:34:23Z","isPatch":true,"sender":{"key":"name:Srujith A Poojary","avatar":null},"body":"From: Srujith Poojary <poojarysrujith@gmail.com>\n\nAvoid piping output from git version directly into sed to ensure\nthat any command failure is properly caught by test scripts.\n\nSigned-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n---\n    [Outreachy PATCH] t0001: avoid pipes in test scripts\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v4\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v4\nPull-Request: https://github.com/gitgitgadget/git/pull/2260\n\nRange-diff vs v3:\n\n 1:  a70ccdf49e ! 1:  4373eef413 [Outreachy PATCH] t0001: avoid pipes in test scripts\n     @@ Commit message\n          [Outreachy PATCH] t0001: avoid pipes in test scripts\n      \n          Avoid piping output from git version directly into sed to ensure\n     -\n          that any command failure is properly caught by test scripts.\n      \n          Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n\n\n t/t0001-init.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex f1d227f271..c8c74f681b 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n \t\tsane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n \t\tgit init refformat\n \t) &&\n-\tgit version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n+\tgit version --build-options >build-options &&\n+\tsed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n \tgit -C refformat rev-parse --show-ref-storage-format >actual &&\n \ttest_cmp expect actual\n '\n\nbase-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd\n-- \ngitgitgadget\n\n"},{"id":"556796","messageId":"CABh_KWik1x+CjVoTAywGLEeURVWj7u_TmWMsAwnma4g18MMoUg@mail.gmail.com","threadId":"66572","inReplyTo":"auM4FazXNNwLzM3-@pks.im","subject":"Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-29T14:36:05Z","receivedAt":"2026-10-29T14:36:05Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"On Thu, Oct 29, 2026 at 5:42 PM Patrick Steinhardt <ps@pks.im> wrote:\n>\n> On Fri, Oct 23, 2026 at 05:13:08AM +0000, Srujith A Poojary via GitGitGadget wrote:\n> > From: Srujith Poojary <poojarysrujith@gmail.com>\n> >\n> > Avoid piping output from git version directly into sed to ensure\n> >\n> > that any command failure is properly caught by test scripts.\n>\n> Formatting of your commit message is off a bit with an empty line in\n> the middle of the sentence.\n>\n> > diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> > index f1d227f271..c8c74f681b 100755\n> > --- a/t/t0001-init.sh\n> > +++ b/t/t0001-init.sh\n> > @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '\n> >               sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&\n> >               git init refformat\n> >       ) &&\n> > -     git version --build-options | sed -ne \"s/^default-ref-storage-format: //p\" >expect &&\n> > +     git version --build-options >build-options &&\n> > +     sed -ne \"s/^default-ref-storage-format: //p\" build-options >expect &&\n> >       git -C refformat rev-parse --show-ref-storage-format >actual &&\n> >       test_cmp expect actual\n> >  '\n>\n> The changes look good to me though. Thanks!\n>\n> Patrick\n\nHi Patrick,\n\nThank you for reviewing! Good catch—I've removed the empty line in the\ncommit message and submitted the updated version.\n\nBest regards,\nSrujith\n\n"},{"id":"556858","messageId":"auRGDmW0R-Ipn-gT@pks.im","threadId":"66572","inReplyTo":"pull.2260.v4.git.1793284463139.gitgitgadget@gmail.com","subject":"Re: [PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-10-30T07:24:07Z","receivedAt":"2026-10-30T07:24:07Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Oct 29, 2026 at 02:34:23PM +0000, Srujith A Poojary via GitGitGadget wrote:\n> Range-diff vs v3:\n> \n>  1:  a70ccdf49e ! 1:  4373eef413 [Outreachy PATCH] t0001: avoid pipes in test scripts\n>      @@ Commit message\n>           [Outreachy PATCH] t0001: avoid pipes in test scripts\n>       \n>           Avoid piping output from git version directly into sed to ensure\n>      -\n>           that any command failure is properly caught by test scripts.\n>       \n>           Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n\nThanks, this version looks good to me.\n\nPatrick\n\n"},{"id":"556860","messageId":"CABh_KWgjkgbXhTcvTu6enOXcEDziJ4S5XZ7MMMkKLYqRxTE4xg@mail.gmail.com","threadId":"66572","inReplyTo":"auRGDmW0R-Ipn-gT@pks.im","subject":"Re: [PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts","fromName":"Srujith Poojary","fromEmail":"poojarysrujith@gmail.com","sentAt":"2026-10-30T08:05:49Z","receivedAt":"2026-10-30T08:05:49Z","isPatch":true,"sender":{"key":"poojarysrujith@gmail.com","avatar":null},"body":"On Fri, Oct 30, 2026 at 12:54 PM Patrick Steinhardt <ps@pks.im> wrote:\n>\n> On Thu, Oct 29, 2026 at 02:34:23PM +0000, Srujith A Poojary via GitGitGadget wrote:\n> > Range-diff vs v3:\n> >\n> >  1:  a70ccdf49e ! 1:  4373eef413 [Outreachy PATCH] t0001: avoid pipes in test scripts\n> >      @@ Commit message\n> >           [Outreachy PATCH] t0001: avoid pipes in test scripts\n> >\n> >           Avoid piping output from git version directly into sed to ensure\n> >      -\n> >           that any command failure is properly caught by test scripts.\n> >\n> >           Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>\n>\n> Thanks, this version looks good to me.\n>\n> Patrick\n\n\nHi Patrick,\n\nThank you for the review and guidance throughout this patch!\n\nBest regards,\nSrujith\n\n"}]}