From a70ccdf49e0ccdbfc4ff05ec6042bc6d1a5a97f1 Mon Sep 17 00:00:00 2001 From: Srujith Poojary Date: Fri, 16 Oct 2026 08:08:10 +0000 Subject: [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts 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 --- 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 f1d227f271677c..c8c74f681b8a4d 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 '