From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3181C1E9B1A for ; Sat, 1 Aug 2026 04:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785558464; cv=none; b=prrJPNLgNbewKkh2+IecFwOLvJ1wwG373TWbFmY/p0s89c4En7OXoTn7ZUZYhjRms/j+1+Gq81B4eCoy/U4SrT0J3TzbnMU0AxSiJj1L4cOddpni01xlk6RtEZk543Aqe4NiuisppJJcdV9MInG7IrK6XWx/nmOOUI+Dk2oOcdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785558464; c=relaxed/simple; bh=hU6xezQyMyFd/Nf3fpXdb7jyCsOP6Nc0aMFrw0uC/Dw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=LhHbA6vWTtkDljWGaswJGstVcMufwNcVgFUx5HFgml1AM++zKcZT7DheGmuVkMEmQfOpVx/WZq/CrOx9OKOMB5kNBRTZbveh+duI1Vv0VpTIOKJ+9rmSDP32Wr9+6N45AQlmS42hm2i6iDSA3H8WL5IwGXGHRheWjKwoTTONCew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=Riw+76o9; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hCwy7IZs; arc=none smtp.client-ip=202.12.124.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="Riw+76o9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hCwy7IZs" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 28FB77A00B2; Sat, 1 Aug 2026 00:27:41 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-02.internal (MEProxy); Sat, 01 Aug 2026 00:27:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1785558461; x=1785644861; bh=vxL5IkFjYV NB6/9ECKF/fgq8ACbl268qgV/9qC9YQNc=; b=Riw+76o9fg2p2EAcfeuoZ1vuxq jPOh4lGutfD6WHYZpnI8OFfO+9zbwOUKDrEayauk83wndyPcvSKzo3EV5N3QbdkH FydHk99Hr0IjfHZAdhfoCrROJXoFKFKew9QzoCZeQst79z/86mIN89m3h4AwF5tV FEXkyx0zNkzEkUrb1MFl7lBvDSWKo3SaXcKxWo/GdnDCdOTcAQq+C55snbjzexac QIFx3vPdDaMEUsrdekQkEN63e88TykWXvspCwdMz66fHEDzKTIh1gPefXpJJmS8R IL8VXOZzdawGd2Wb4Ddr+UCmWYW4JTmtF/YaM/NMerVu6JNeILd7mghntmOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1785558461; x=1785644861; bh=vxL5IkFjYVNB6/9ECKF/fgq8ACbl268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QYJE9jA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 1 Aug 2026 00:27:40 -0400 (EDT) From: Junio C Hamano To: Pablo Sabater Cc: git@vger.kernel.org, chandrapratap3519@gmail.com, karthik.188@gmail.com Subject: Re: [PATCH GSoC v2 2/6] t5701: use the test_file_size() helper In-Reply-To: <20260731-objecttype-support-v2-2-af577461ed57@gmail.com> (Pablo Sabater's message of "Fri, 31 Jul 2026 21:49:35 +0200") References: <20260731-objecttype-support-v2-0-af577461ed57@gmail.com> <20260731-objecttype-support-v2-2-af577461ed57@gmail.com> Date: Fri, 31 Jul 2026 21:27:39 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Pablo Sabater writes: > An object-info test uses 'wc -c Update it to use the test_file_size() helper instead. What is missing from this description is what is wrong with the use of that "wc -c | xargs" construct. What benefit is this change supposed to gain? > Mentored-by: Karthik Nayak > Mentored-by: Chandra Pratap > Signed-off-by: Pablo Sabater > --- > t/t5701-git-serve.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh > index 9a575aa098..b4d6beef11 100755 > --- a/t/t5701-git-serve.sh > +++ b/t/t5701-git-serve.sh > @@ -356,8 +356,8 @@ test_expect_success 'basics of object-info' ' > > cat >expect <<-EOF && > size > - $(git rev-parse two:two.t) $(wc -c - $(git rev-parse two:two.t) $(wc -c + $(git rev-parse two:two.t) $(test_file_size two.t) > + $(git rev-parse two:two.t) $(test_file_size two.t) > 0000 > EOF It is not like we want to avoid piping wc -c into xargs and hide the exit status from "wc -c". We are already losing the exit status of "git rev-parse" anyway. If the test after the change were like this two_object=$(git rev-parse two:two.t) && two_size=$(test_file_size two.t) && cat >expect <<-EOF && size $two_object $two_size $two_object $two_size 0000 EOF you can sell it as "we do not want to lose exit status of 'git rev-parse'", "we do not need to run the same command twice", etc. But it is unclear what we gain by rewriting the wc-piped-to-xargs to test_file_size.