🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1223

[PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts

#1223
From: "Srujith A Poojary via GitGitGad...
Date: Fri, 23 Oct 2026 05:13
50 lines
12574 bytes
From: Srujith Poojary <poojarysrujith@gmail.com>

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 <poojarysrujith@gmail.com>
---
    [Outreachy PATCH] t0001: avoid pipes in test scripts

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/2260

Range-diff vs v2:

 1:  7d118290ce ! 1:  a70ccdf49e [Outreachy PATCH] t0001: avoid pipes in test scripts
     @@ t/t0001-init.sh: test_expect_success 'default ref format' '
       	) &&
      -	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 &&
     ++	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..c8c74f681b 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
Technical Details
Message-ID: <pull.2260.v3.git.1792732388827.gitgitgadget@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72934-linux-kernel-git=dewy.ru
References: <pull.2260.git.1792299301663.gitgitgadget@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72934-linux-kernel-git=dewy.ru
From: gitgitgadget@gmail.com ("Srujith A Poojary via GitGitGadget")
Newsgroups: linux.kernel.git
Subject: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
Date: Fri, 23 Oct 2026 05:13:08 +0000
Organization: Usenet Network
Message-ID: <pull.2260.v3.git.1792732388827.gitgitgadget@gmail.com>
References: <pull.2260.git.1792299301663.gitgitgadget@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="416723"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AJkffJLp4bIa/lHXkHn8snP4Ym8= sha256:L+bIHvsONh2WWPbqgwsdTeHbZuOMlGNRZrexJgKUgKM=
	sha1:QhCDcr3EbydP0KdLwFV5wda7kyg= sha256:5oB07L01VYjaJdd/w+SL4pLqCV3Gke1W5oazr5DbYjE=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id BF1C01113EE; Fri, 23 Oct 2026 08:13:29 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.047
X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id g9CfuHzaXoiB;
	Fri, 23 Oct 2026 08:13:26 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72934-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 1D46C110E3A; Fri, 23 Oct 2026 08:13:17 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 2BF6F47AE6; Fri, 23 Oct 2026 05:13:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792732392;
	b=GkHXFmisjF/ukkFQOQ+7SRgV0HyfmrWJ0T2RjPMIWt8SmD4nsxV5ZiE4zvOeyTN9T96s
	 fmUJ0dxEDS1BzgzDZBU+V5YYd6GcTybbHS+DYbltbj44onyHdSaZmjXSYh9pwaPysvRKf
	 vwNhvwjjZtyY+UMCr8Yqf8Eubd/FiHUIm8Ga3B9XhnKblmx5SfdKQEVU2mN7j93OMS98i
	 fpeUdmsKlRuruJnX+dpHZP9jNqYXdnPw245u9p0jj5yEHO6f4adVqayEOaAQVI+jRoTj9
	 7ErL80dxfvBuEARKxckFqhhKCvqyw6hNsRYOJH5PwmnQhtbBz/nL1jfXacvy0UnJFYQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792732392;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Message-Id:In-Reply-To:References:From:Date:Subject:Fcc:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:To:Cc;
	bh=3rxJ6ryxqVP3WGDJJxXRtjRlCaVAhVrBLd2a6IcoHx8=;
	b=ftwJT2dibcpc5xlxjFjJqDm/xwx5jWXjTtcxGw6L2KAzstwM0pI7aPmZXG00EUtxAxx9
	 gzRLQHuJRc7ITTTj+7XNBEV+IhfUqwnlPOf8/Ms5fYIUaPnSuimxLfthLPPiUw1U6XP+P
	 JmtIrBrVdcf8JySdLNHBgGEEm0KMSj56sz3WBQE68DseFQKYgSI9Kq2vmdxbaQ+bcYucw
	 IdMxqTTzdMYgTGIwUch9aPKCKkQkpZRZGR8m/DcLHOBmU2uMzIbKTwht9BD38t/Ch3/19
	 egNr5IEjRtNZlEkvKzkn1GH0FctOLJtN41bl4PmFKeILLJap3BuJn7R1a7eX7+Dy0Rw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=gcKYSqbi;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 02442606A31B;
	Fri, 23 Oct 2026 05:13:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=gcKYSqbi
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.169
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792732391;
	b=yS9/QhG35m+dUAgzDiLuiQF5U0i608ITTc+6eHUkX4CzoxG/dmRC8oKluHVDYIzAfJyq
	 kKjOpEnp89N4ozPqZdqDB5ykqbXxBe6EAq8FjC9zvCcsqR7wG54nSqMIKjs+Tzyhn8LxP
	 2tbzGawg/e1PoCZUpUWGkXgNFst7g5H8ekhKag+EDplCqV2i8/+dqoq07IOcIRzcXtvWt
	 uTNkU+3ZH6qWoLBoAVZy2N/BECP8+QLrncO+AqzYmttpxBdCcJzqlPVgLJeo6UFdMJ03q
	 g/4KnpMRFtBUpm1eDP8ueWDn1F69omNI0fbnYbs5Cbo/7b62buxKBF8CBcHdiwKIOZQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792732391;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-Id:In-Reply-To:
	 References:From:Date:Subject:Fcc:Content-Type:
	 Content-Transfer-Encoding:MIME-Version:To:Cc;
	bh=3rxJ6ryxqVP3WGDJJxXRtjRlCaVAhVrBLd2a6IcoHx8=;
	b=p21tZVr1mQCdQhGPmwn5B6Yq56SmQyxJZiq7KuzV47ssvzFbGejTUnzzQIjPZwLb0+TA
	 Rbhud+m/27UglD1XP/qeLD3zJLz5iyPAd5MqGllctHQPkmDBE07HRU9tIMf2rtZWGU7oa
	 o34ky2L4BhqWlepwiOLl2KVAWKFbkpiNLFJN8YDwK87osSYSJba+Ztscm0fOhbE1sw8Fb
	 zeKQlIfLGCHM8H+NaTuzoNlH7mvGVZJCrG1HbHh9tLrVtBnPugoRXleV2OFT0JHAUtdPG
	 u7y4bUMSpVQIsazjBwHu5HK8E433UIIKyVfFuRSzvcegUmaPRCtGwksWjPOQoTbNw5g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=gcKYSqbi;
	arc=none smtp.remote-ip=209.85.160.169
X-Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C57B7606A31A
	for <git@vger.kernel.org>; Fri, 23 Oct 2026 05:13:10 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C57B7606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-53644ab1f7bso3671771cf.3
        for <git@vger.kernel.org>; Thu, 22 Oct 2026 22:13:10 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792732390; x=1793337190; darn=vger.kernel.org;
        h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
         :subject:date:from:references:in-reply-to:message-id:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=3rxJ6ryxqVP3WGDJJxXRtjRlCaVAhVrBLd2a6IcoHx8=;
        b=gcKYSqbi+YrQjHn+3oK+Ns66hCRkRaT4HvQqcCFLwRDOPWfgKPQqVMz7Mm9E3eCe9y
         g/EKIXMW/8Nvqy6MwFV5lj+6s+B42QKDPzRO6wje+hi6UHivAlSsr9L0uNBwe9VCQZ1Z
         KGekGJyI7ut5thxtUKgnJ5Gkx6kTBbVVOTdcG6BUj8I3J8FPkAluBFY9WuH+B5ZYDYtE
         Ln8WRq1OwOZdQoW3iupVGgVRLrUwM2q9/LAmkfY5CSfofdrAbEcyWBacemAv0ft/AH94
         jA+wEksF7yq0N/q4ptVFJJHsxdIStwmBbz7/JspIyym16sRRhcWM1NTlPUF+JiTZO3b3
         iyEg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792732390; x=1793337190;
        h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
         :subject:date:from:references:in-reply-to:message-id:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=3rxJ6ryxqVP3WGDJJxXRtjRlCaVAhVrBLd2a6IcoHx8=;
        b=J3lM2mx+d4Dha9aZKsf95/PV3J/c9SuXps0bWxcMdNdi+77QckuNEGeIgHyxfkuTG3
         RW/xd7MTrWSxe1C8CGMyUjqRBGgHc9rrDgQQtI4QGJFHolTkMBnL9PbbmnQ8MwTpjdEL
         ygcZf47ZDF71jLy+yUBRehXCaHEXb9tvCSnw0cSWrAAhd4UlA9cDLFloGHIqbWHL6L4I
         qRpXJOziKDva7SIP0ECZK9gBQeH5KmStcN5ocpfYwbr6O+j42YlcF9Bd22c8W1RDTRkS
         1OUYAD2wgGRd2QIxZtEh2q9TNO5Mz3mvl9eokhLohHibu143rg+3KIzKc50tmamfuzY1
         k2jg==
X-Gm-Message-State: AFq9FYJ5kMbpAgcWKT6kxMXyyWOzW9cxvsN9pHzOWDtia4uCPHQLpC15
	iV2ckmuZmAQjhUJRhRC58UhJ5ccagNKr/aE53vc9pn+/nP/sDv0h5b65qrF8DGVH
X-Gm-Gg: AYBFou3jYYRG31e4sTqxm0S5ZPd4Eoiism5HktRYS3ooNTqfPMIiKxEmH6EtSj6qxoQ
	un0a0Wzfmdh2336TBYmxk1JJiEMPcdwo4IzcGFACTC5L4SChrgGJpHM2SlIN4RQERO8BwDY8smk
	MvqjuEuzS+8AzzsiaKwLDgEk6nPU+Ibd9p6aReg74syG6TG+Y9LeFO6mBGcZRFlKogL/Jm9sXlb
	Tkqfu3AnGwt/i3FVbyCxTrDp5no1pCP7jcnKN96Gm12uYBG0CpPbsNyeOhI77YI90F4+22DzXlj
	KlHq2oVxJ+4d9eBxQA592tx801QKGAfI3+dduOZwdnhIOWpKHVjI3H3X3srGK6+x50ipldiToEg
	dK1aE1Xkv9/nF39xvcSDGjEz80+T+N0OxG4WPi39moQWZvvjb8RdtvkD6ZwbCC46gxhs+uGIowG
	Epysb35rnR+KswvaMl80LogeWzFcxgbFJhAdaX6ig5/6/bTtTwKBVTGL36OtnQoJSuR1IBww1QT
	wPIaakB50Y0g/wskJ0d9nvfc/SWzMIy7eYBi7+IsFWREgiwsrwzdjyePDLoEQ==
X-Received: by 2002:a05:622a:a58c:b0:536:51d2:1e44 with SMTP id d75a77b69052e-536c2805090mr15157721cf.22.1792732389698;
        Thu, 22 Oct 2026 22:13:09 -0700 (PDT)
X-Received: from [127.0.0.1] ([145.132.102.242])
        by smtp.gmail.com with ESMTPSA id d75a77b69052e-536c167dc29sm9399341cf.3.2026.10.22.22.13.09
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 22 Oct 2026 22:13:09 -0700 (PDT)
X-In-Reply-To: <pull.2260.git.1792299301663.gitgitgadget@gmail.com>
X-Fcc: Sent
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>,
    Srujith A Poojary <poojarysrujith@gmail.com>,
    Srujith Poojary <poojarysrujith@gmail.com>