From: Srujith Poojary Date: Thu, 22 Oct 2026 10:53:50 GMT Subject: Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts Message-ID: In-Reply-To: Hi Usman, Thanks for the suggestion! I have updated the script to split the command into two separate lines as recommended and resolved a trailing whitespace issue. I've submitted v2 of the patch to the mailing list via GitGitGadget. Best regards, Srujith On Thu, Oct 22, 2026 at 4:20 PM Srujith A Poojary via GitGitGadget wrote: > > From: Srujith Poojary > > Avoid piping output from git version directly into sed to ensure > > that any command failure is properly caught by test scripts. > > Signed-off-by: Srujith Poojary > --- > [Outreachy PATCH] t0001: avoid pipes in test scripts > > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v2 > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v2 > Pull-Request: https://github.com/gitgitgadget/git/pull/2260 > > Range-diff vs v1: > > 1: 92ecaec2cd ! 1: 7d118290ce [Outreachy PATCH] t0001: avoid pipes in test scripts > @@ t/t0001-init.sh: test_expect_success 'default ref format' ' > git init refformat > ) && > - git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect && > -+ git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect && > ++ git version --build-options >build-options && > ++ sed -ne "s/^default-ref-storage-format: //p" build-options >expect && > git -C refformat rev-parse --show-ref-storage-format >actual && > test_cmp expect actual > ' > > > t/t0001-init.sh | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/t/t0001-init.sh b/t/t0001-init.sh > index f1d227f271..02217a9bf8 100755 > --- a/t/t0001-init.sh > +++ b/t/t0001-init.sh > @@ -678,7 +678,8 @@ test_expect_success 'default ref format' ' > sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT && > git init refformat > ) && > - git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect && > + git version --build-options >build-options && > + sed -ne "s/^default-ref-storage-format: //p" build-options >expect && > git -C refformat rev-parse --show-ref-storage-format >actual && > test_cmp expect actual > ' > > base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd > -- > gitgitgadget