From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 7CFD63358B9 for ; Mon, 13 Jul 2026 16:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783959026; cv=none; b=pJGnpnSxUiqO0/gGlXyrT1PNxhrD90lUsDFfv2wBH6WdFUy37tk7/trj7Ecd2WTXJIcYAOOGgRtmFn6PCQ3vidV38UGLURsZvdRLc4MFCZNMcShsj6iUbeNjfmKD8Ah7LTB2G6BwN8WwCbYFfKFYbQUpWNWRjMb/nqiSnejLuv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783959026; c=relaxed/simple; bh=8YiGvXvgUaxijEOIkDOIBr1FXRyH+9r0egXKSx3T9Jg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=jmNbTQ6PhBaNUiD5S0k1L3L12PEjj45a/5XfNZJRSCzZPtiTSLuLtOdrR2+QXpX6a9Llx5sSXCdQxMasVNPlz8lC6bYnRlj69dzajBd0dn84GJ7oIWJG9P0gEkxYLKk1w7B9enlkbNP5/UxlJv7XArEU7G6zRvpletrsxyM5Coo= 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=E2/7OG8b; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=AJt07zi/; arc=none smtp.client-ip=103.168.172.158 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="E2/7OG8b"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="AJt07zi/" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 546171400124; Mon, 13 Jul 2026 12:10:22 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-03.internal (MEProxy); Mon, 13 Jul 2026 12:10:22 -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=1783959022; x=1784045422; bh=YyL3TIREwV lT2lqkvBO0OgYG6VR1cYJwVrnyg/LWB8I=; b=E2/7OG8bllqzW3NxznXhdraYM4 urckNhROm1KTk7itiqu4Gbe9rBx5+eZhpzbBNi5ra5o5Im9xsg45Zl5zbmfKDW+i pWh+3ImOkbf+hsUhkbWdUWlWa16DxlOpKYiJ7uT9gCfI7ROSuN3yF5PPKx5HFqCQ zei0ZeQNh69feoBQOrw0aWtZRYgUdt/1K0ydvex7zvhOYXUTXJH/jFIx+JV1VfmS 6pJJ3VPo0vsI56RhZYLNJ352x5rPxJPe6rt6943kDBE8ooA2OPlWWKNVa9l5Xm0z NlZGSuz3HXTzDlUmbm/AflVOXD+TDKXi0IhFjBnaywJLQkAUSkCJeJ7tvSxA== 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= 1783959022; x=1784045422; bh=YyL3TIRE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8KNmdQekY71EoN9jPYYphMvX9biTeXMIeLrBX93Gig X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jul 2026 12:10:21 -0400 (EDT) From: Junio C Hamano To: Shlok Kulshreshtha Cc: git@vger.kernel.org Subject: Re: [PATCH 2/2] t1100: move creation of expected output into setup test In-Reply-To: <20260713140142.27898-3-diy2903@gmail.com> (Shlok Kulshreshtha's message of "Mon, 13 Jul 2026 19:31:41 +0530") References: <20260713140142.27898-1-diy2903@gmail.com> <20260713140142.27898-3-diy2903@gmail.com> Date: Mon, 13 Jul 2026 09:10:20 -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 Shlok Kulshreshtha writes: > The "expected" file was created at the top level of the script, outside Use the present tense to describe what the current code does. For example: The 'expected' file is created at the top-level of the script, outside ... > of any test. Code that runs outside of a test is not protected by the > test harness: a failure there is not reported as a test failure and is > easy to miss. > > Move the here-doc that creates "expected" into the existing setup test > ("test preparation: write empty tree"), using a "<<-" here-doc so its > body can be indented along with the rest of the test. > > Signed-off-by: Shlok Kulshreshtha > --- > t/t1100-commit-tree-options.sh | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) Trivially correct. Thanks. > > diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh > index fabe5a97cb..b434d1848e 100755 > --- a/t/t1100-commit-tree-options.sh > +++ b/t/t1100-commit-tree-options.sh > @@ -14,15 +14,14 @@ Also make sure that command line parser understands the normal > > . ./test-lib.sh > > -cat >expected < -tree $EMPTY_TREE > -author Author Name 1117148400 +0000 > -committer Committer Name 1117150200 +0000 > - > -comment text > -EOF > - > test_expect_success 'test preparation: write empty tree' ' > + cat >expected <<-EOF && > + tree $EMPTY_TREE > + author Author Name 1117148400 +0000 > + committer Committer Name 1117150200 +0000 > + > + comment text > + EOF > git write-tree >treeid > '