🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #920

[Outreachy PATCH v2 2/2] t0410: keep git's exit code in test_grep calls

#920
From: Dorine Tipo
Date: Tue, 20 Oct 2026 16:01
37 lines
11905 bytes
The 'rev-list stops traversal at missing and promised tree' test passes
"$(git -C repo rev-parse ...)" directly to test_grep. t/README says
not to use command substitution in a way that discards git's exit
code: the && chain only sees test_grep's exit code, so a failure in
git is not caught there.

Assign the rev-parse output to variables first and pass those to
test_grep instead.

Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
---
 t/t0410-partial-clone.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index a24b663f73..57da830105 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -413,9 +413,13 @@ test_expect_success 'rev-list stops traversal at missing and promised tree' '
 	git -C repo config core.repositoryformatversion 1 &&
 	git -C repo config extensions.partialclone "arbitrary string" &&
 	git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
-	test_grep $(git -C repo rev-parse foo) out &&
+
+	FOO=$(git -C repo rev-parse foo) &&
+	HEAD_OID=$(git -C repo rev-parse HEAD) &&
+
+	test_grep "$FOO" out &&
 	test_grep ! $TREE out &&
-	test_grep $(git -C repo rev-parse HEAD) out &&
+	test_grep "$HEAD_OID" out &&
 	test_grep ! $TREE2 out
 '
 
-- 
2.34.1
Technical Details
Message-ID: <20261020160127.29096-3-dorine.a.tipo@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-72561-linux-kernel-git=dewy.ru
References: <20261014134504.1152225-1-dorine.a.tipo@gmail.com> <20261020160127.29096-1-dorine.a.tipo@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-72561-linux-kernel-git=dewy.ru
From: dorine.a.tipo@gmail.com (Dorine Tipo)
Newsgroups: linux.kernel.git
Subject: [Outreachy PATCH v2 2/2] t0410: keep git's exit code in test_grep calls
Date: Tue, 20 Oct 2026 19:01:27 +0300
Organization: Usenet Network
Message-ID: <20261020160127.29096-3-dorine.a.tipo@gmail.com>
References: <20261014134504.1152225-1-dorine.a.tipo@gmail.com>
 <20261020160127.29096-1-dorine.a.tipo@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3893841"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:T6JIuzi96nDL43XeDQVrVm00690= sha256:svoxy1knKIj3hrIOlaPgagTkoH3I/l/DA5gzQZcwpj0=
	sha1:AVnQbTlIa7qBIRgcOPrG+49eDjM= sha256:/hltzYxjtwNHAbOMwWJ3DtIyU8GX5Buvt7ohQpnWkDw=
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 BBD9A110D76; Tue, 20 Oct 2026 19:22:50 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, 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] 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 O8ZbROyFVhG0;
	Tue, 20 Oct 2026 19:22:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-72561-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 987C8110D6E; Tue, 20 Oct 2026 19:22:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 9C98233097; Tue, 20 Oct 2026 16:02:06 +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=1792512126;
	b=NfP4m21LpnEP2jMacH2SBr0bXtlCdcncRg7PHYfx/aa9n3JgcbtljjfPuQo2c642rT9T
	 HYnBdslyWSI7XzxUb5Q9kllFHXHxJCTbB+M7WR47Kq3tybC9JFnqL539HKmfkCznMHdFY
	 EctobWw9G4ogKa86pi+MctJcPxM8vuSjMyGM8MGXpm9hwiRh8kjN488p+Q0SNGSMJnykV
	 PdGL/8KdhisfIEi5DuQKf+fDoex7btaUtsPpmZopJoNZbyRCDSfK1yFx7b/s92u4Qly5C
	 bxztBle/KelOdkv1Fh9Cm0AKZV8BVUIsXBHAYuX+mfD18sRCJa6Esy1v+5Q7Yw1JLwA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792512126;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=jEQ9yRnlCtcahXqvJtdpM0NFjMP8mp8Ed5zgtVcIH5M=;
	b=yn1oWMC1Lq0YWs/80PyVsYJPFdAoR///DgJOwNxPQWsD7vjueh4O3YeQYvy9Y4SdS0y0
	 kjvAIHTaSIdyKZVYlob3j0eB6HD6mg24NgBiNfmGwmTqMJ2NQvf2Sed8NB4e1+FMGZVxi
	 RQmpfbYOX5nW7HnHG1gZmcKjlGuRHWgtbnA3zw4iORkFTj1mvQxnVJ9pO1jPhkqq6GfyH
	 wIsvlH48WNPK9QCxpsQlYjpbO6loO/AZLuYf6X9OfIXzhoNreSPMN34rcM7ESK9+YrGci
	 /fXFckqn1q7RXSQjRHnHh/gee3zR8RX273EL8td4hx46RtLQ+0BDOgdsCm+fFayQn+g==
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=U7RTdC29;
	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 E8759606A320;
	Tue, 20 Oct 2026 16:02:05 +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=U7RTdC29
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792512125;
	b=iDaqDD4j/FeEoDnBW11S/vdz25i7XZq2teT4PbNA9LJazehZNJHJDhcIOvNyNc48nuYm
	 GQR5FU/a4B8dSP5J1pjMz/+oTX3cxEm9DBAway9mB8kAzKdR1juxQUyIXI27F3xL+f4YG
	 DsBi5C+xkEyVJYw8uT2VrlUUHLEUIMb1+waq/kO4VStofEApOezjYeUTM88JvRgzKnRUP
	 cHGj3iv5KHZI5NTWChNBtMcEvGRalBJmJW+RJNfQWgDZ/Km6GLVhqPNfNLxa1S6PAqlh1
	 Cb7zOsIChHCoCUhsMr21uZ93LTZ19DykFrc2MmlMmBtxmg0wGL9+zEfueA15WovAXLA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792512125;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=jEQ9yRnlCtcahXqvJtdpM0NFjMP8mp8Ed5zgtVcIH5M=;
	b=djWMRSOL1VjuZk0uowtjVXU53XiKym7DY2onIdftNdpVtO1vFyG7D0D9jybN1H0CmXIS
	 EW/cDY/70jM12059uVY5RSIIZMzQBwabgrLOE1XZLP5vjw/ZJqRLrfla77PCWJx5jxy0V
	 97BmzeDnsYSM8d7CBGXNn4CpLPd2ERjYlcXV3HweLLwBYQOVbNRgWzUSWYMCMo6Z50CjM
	 Tqit7EmtlZV2QsIoaTMm2JzqUrMyOaYIOdXotAKOf1pYcRCVan1l0pdzHh7fzJGJ963Ny
	 azfrb9VWhkTnKUumvoPln9LSbAo9OlpqJp+oCNnnCAwqFsPMNOskheVN9OoKGpUIPUw==
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=U7RTdC29;
	arc=none smtp.remote-ip=209.85.128.47
X-Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47])
	(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 BAB9D606A319
	for <git@vger.kernel.org>; Tue, 20 Oct 2026 16:02:04 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BAB9D606A319
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-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4a171b677d2so20250325e9.0
        for <git@vger.kernel.org>; Tue, 20 Oct 2026 09:02:04 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792512123; x=1793116923; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=jEQ9yRnlCtcahXqvJtdpM0NFjMP8mp8Ed5zgtVcIH5M=;
        b=U7RTdC29nYDsKwP/SjYxxuagDU3Ed8Q9yXKf9nJMFFGOvVfx+Pii6BAQ3gnDV/dnm+
         2BiehszijGwPwPLogxJcxv3P6UWSH4sbwGQak+KMs941eey5vHeKvrYwKCN+X6P9GgtC
         mIZ6Nk1MTX/TFX66ofF6zCNHW6qpPZPAwREVKFxuvGeiJ1bbGFgZQuLenGEbB7xapiFc
         Yyh/K0UwWYXbw9J57OgdfKn8KUVAfS45wkAjBR9wF34tu/bm9pGXGVLwPzIrl72j11qw
         thdIfk20Mm9Lqw1XcwcDDuj3mTOlfkwtGih/6cCy9LVoM/wv0ZA3ZVWO5tQRMQeY9qJN
         8QHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792512123; x=1793116923;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=jEQ9yRnlCtcahXqvJtdpM0NFjMP8mp8Ed5zgtVcIH5M=;
        b=ey23xOhMt7dYHabqU3gUYfqQnHgqIan5DNRY8iZheTccDcALe4y9Zp5EQyzf9sZlvQ
         ygHR5iHcK3DrGbjmNt7ggng5PanM0SMJoduIu4D0rKI2SN8CJRB+G55uyM8artn3gvVs
         aND+j7dmJGo8I50rLkYWFeIPnCtG/aBH/XqQcBT9JI9w9p+khS2JHzQAIDVHY0sVXzd2
         yHTkgYyLAhd76FQJkKeTPeGPhTwPfF4kUzk/dQOSJmg2xNL1lc4NrGE3t8T4bx312PJd
         pyxIcjHd0Jq5T27YgDZY61sCCngvuJ0Qbp2MOZSqPetBy+B533VZeinBUsYK16wTl+La
         9lCw==
X-Gm-Message-State: AFq9FYI3NZVKXivcf06CeW7yRD2Gpm+zXjMrMs+ul/3IoFU2Ch9CgHpA
	DE9OKbHZsAMPDa5T2R5ZYLa2p/b+uuzr/+2sztU7pLnXZVYCPaqKZRT0A3su/4JQ
X-Gm-Gg: AYBFou1pSuLxf7a+fYrONoDdZGY9FSJ+pzdbVhVPcqejA3s/RIHLLHwEnc1KRW2OWlW
	WrS8KyzKowFWNZqfuzfgt6H7wacG7e+CZZ8pnkTNdGVUWQjC9KdxP0BvXCLVmI/QrGsRhYyZvCo
	hfga5o85evfC3fiU5Y2a58aouxXRNE5ApiRTzuiVdDA5Q9hDnew0GQWhUSOO+ePwlMjrDxWkL3m
	tYQqaEPk5J4oSOjQPloLXHBqRaq68QaF041Uz6qwYnPvkrg9MbOUzLodPthY2sOxCA+Fpd5gOpD
	Csg6mfKq35taCdzQDvUlMkhKYjs1YV9/eept+f+CJ4atwOZ67pEj34xRm444pXSmvTWjMO0XCiV
	ZkLW9s/1osYV4mch1v9LeR/UtdGdoQKgCIOqu/teSbgbVwikxbhif6cuKBM+4T1+9kIa83XbxQ3
	ogmx2uH7NtDT1gNZTugRLH3juZ4mMoQcOt5SROZAZPAlng7w7IUiGAmgG0jmRdLvhDni4l9DB4W
	5VWlB6fxX5YfPWKbqJ8/3ZH04gimpW/YyM9GKUt2c5c
X-Received: by 2002:a05:600d:82c7:b0:4a1:fab3:cf62 with SMTP id 5b1f17b1804b1-4a1fab3d2b2mr24299045e9.28.1792512122942;
        Tue, 20 Oct 2026 09:02:02 -0700 (PDT)
X-Received: from Stealth.zuku.co.ke ([197.237.143.156])
        by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e1d830e91sm7157410f8f.54.2026.10.20.09.02.00
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 20 Oct 2026 09:02:02 -0700 (PDT)
X-Cc: gitster@pobox.com,
	kaartic.sivaraam@gmail.com,
	christian.couder@gmail.com,
	siddharthasthana31@gmail.com,
	usmanakinyemi202@gmail.com,
	Dorine Tipo <dorine.a.tipo@gmail.com>
X-Mailer: git-send-email 2.34.1
X-In-Reply-To: <20261020160127.29096-1-dorine.a.tipo@gmail.com>
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