From patchwork Tue Jan 9 12:17:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514877 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 E74D8374C6 for ; Tue, 9 Jan 2024 12:17:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="jhNzTK/m"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="xWCr7BJi" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 033A05C03AF for ; Tue, 9 Jan 2024 07:17:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 09 Jan 2024 07:17:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802626; x=1704889026; bh=u8B2Gts39V JRNik4t75pSlaRpCTIInBcHQTFEfL6dF8=; b=jhNzTK/mPAhyFtWMDJf+QbrQpI 2BOEa6/1aiFOmQSDlEemStNXnXBUsF9+iHlcSfqMx+9meDrZba/KgloTpKBhenX+ WjV5RQM+g8zXLdBO+5gjI5JMLgeA7XudyrorZNm1vbAfakJXLNdMf7JRA8kJ0jPV 97wXB9LhWur4jGONZxma1n0s4UXBBo9D3oVIwt+NwoUByQC8cTB6xn0GHRuAo39N 35jGGzTdga4XIQwRlvTucS4tFJHGvZ3+XXQ6iLz/BaG4hL3zXxk0OUGmy7zyWPrc BGFg38Dk/BdeL7q/QmgY6F/G6b6OgHVp7IPW0c3OheidMWlzhz65j/HLgV0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802626; x=1704889026; bh=u8B2Gts39VJRNik4t75pSlaRpCTI InBcHQTFEfL6dF8=; b=xWCr7BJirhJttwYUFqVS5F9H9jPd/eHho8nR5ixU+b16 eCcF7HVsN52bFrTBWQuFGXAwpyT123bkjXNE0xrGkXWC3YLK6eaXto1ypcpdaSAH KVAz2ukP/RsMMqoHs86DCdkdANghhY3QbDHnc3OaO54J1iK13GIr8MkkDEK1x+/W RNOg+hWHiVqM+bh7iyEnP/tcglFJMErBmV7hYNjjTQVMFezn+hLB5f5pjHKDLB7T 4ghJajAIRmpSnrAKQJBd8eU+Rc4WjJ9oj7c55ViDp+w7G/ue2FcN9RZ+2sGNMCEz gGAnkiE1usXdmd+RpwqTMl/SFPFqRKRTUOKMLSYfXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 25e63ab6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:27 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:04 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 1/6] t1300: mark tests to require default repo format Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The t1300 test suite exercises the git-config(1) tool. To do so we overwrite ".git/config" to contain custom contents. While this is easy enough to do, it may create problems when using a non-default repository format because we also overwrite the repository format version as well as any potential extensions. Mark these tests with the DEFAULT_REPO_FORMAT prerequisite to avoid the problem. An alternative would be to carry over mandatory config keys into the rewritten config file. But the effort does not seem worth it given that the system under test is git-config(1), which is at a lower level than the repository format. Signed-off-by: Patrick Steinhardt --- t/t1300-config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index f4e2752134..1e953a0fc2 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1098,7 +1098,7 @@ test_expect_success SYMLINKS 'symlink to nonexistent configuration' ' test_must_fail git config --file=linktolinktonada --list ' -test_expect_success 'check split_cmdline return' " +test_expect_success DEFAULT_REPO_FORMAT 'check split_cmdline return' " git config alias.split-cmdline-fix 'echo \"' && test_must_fail git split-cmdline-fix && echo foo > foo && @@ -1156,7 +1156,7 @@ test_expect_success 'git -c works with aliases of builtins' ' test_cmp expect actual ' -test_expect_success 'aliases can be CamelCased' ' +test_expect_success DEFAULT_REPO_FORMAT 'aliases can be CamelCased' ' test_config alias.CamelCased "rev-parse HEAD" && git CamelCased >out && git rev-parse HEAD >expect && @@ -2051,7 +2051,7 @@ test_expect_success '--show-origin stdin with file include' ' test_cmp expect output ' -test_expect_success '--show-origin blob' ' +test_expect_success DEFAULT_REPO_FORMAT '--show-origin blob' ' blob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") && cat >expect <<-EOF && blob:$blob user.custom=true @@ -2060,7 +2060,7 @@ test_expect_success '--show-origin blob' ' test_cmp expect output ' -test_expect_success '--show-origin blob ref' ' +test_expect_success DEFAULT_REPO_FORMAT '--show-origin blob ref' ' cat >expect <<-\EOF && blob:main:custom.conf user.custom=true EOF From patchwork Tue Jan 9 12:17:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514878 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 E8044381CF for ; Tue, 9 Jan 2024 12:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="rQxu/Lnp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="yvEHXr1E" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id ED7C05C0398 for ; Tue, 9 Jan 2024 07:17:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 09 Jan 2024 07:17:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802630; x=1704889030; bh=6fU+oW09JB NaxYqxMZ6J3nKCBC51//u8lHdlHLmHX50=; b=rQxu/LnpxaLX21qJ/Z4er4lK94 kESSyfojbUL3+3/vyha1YkQPDZ431y9RzLtUCYIgHPcsNVSLuR8bob2qIFAdFMvs UPg8VvIyqIFJOy8THPIA17z9vd5miFpROOo5igKej5y0eYgwUfq8YzZD3vAhTTxN GNxhTAan7Wdu/hrJ6ewLBH26Q8kc4MKV0JwBaHw7MpuZVN7EXPdImV9LTEMk7Y8W 7yDUjyrb9hwdi993nH6f6PVUVfRThYz9Rdlah68mYeMXJnOkv6T5qEQZgD5QLVZU nWSG3r2T6CyTTyQTimQLFSfktihM1h5mKr3qieNeC0Oxt2HEYnoui8mRIl0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802630; x=1704889030; bh=6fU+oW09JBNaxYqxMZ6J3nKCBC51 //u8lHdlHLmHX50=; b=yvEHXr1EI3ahvEoqcf9dTesZ5zrtXMnoGKyzuUeA0wKr fcyvaSo/GCLNmq4tqOFmosCEEoknp27jHwxnKdOc+T/JA9eYnLeg2kVEJMNqGcVd Rj9yuiz1pvE3ivP0ivp7RAAHXBwyMQbG7MpawRsePzj30T0bHH/G2N23hLI1XmmJ t+wRAC40qwFYBcBczsQX4dyDwD/s5abDvHtRpJuIi+cO3FmfWnXLOuIo+WFOdgkK C5D+PklP7TF+iRBZ20VhBP/vWrWEFFlTVfDtEFWsL4sDBwhx6Z5eHUbJbK9pl4Wc W52+FjnhFe1+TMUnmTOf9qmoTWzeugFchDBX9ylpfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:10 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id eec94501 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:32 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:08 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 2/6] t1301: mark test for `core.sharedRepository` as reffiles specific Message-ID: <68e308c200ca5a8b0add1a2cf855d78febd2bf36.1704802213.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In t1301 we verify whether reflog files written by the "files" ref backend correctly honor permissions when "core.sharedRepository" is set. The test logic is thus specific to the reffiles backend and will not work with any other backends. Mark the test accordingly with the REFFILES prereq. Signed-off-by: Patrick Steinhardt --- t/t1301-shared-repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index e5a0d65caa..8e2c01e760 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -137,7 +137,7 @@ test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' ' test_cmp expect actual ' -test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' ' +test_expect_success REFFILES,POSIXPERM 'git reflog expire honors core.sharedRepository' ' umask 077 && git config core.sharedRepository group && git reflog expire --all && From patchwork Tue Jan 9 12:17:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514879 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 A8863381CF for ; Tue, 9 Jan 2024 12:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="H5JtFk0h"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wDTQ1Ox/" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EF0EC5C03B5 for ; Tue, 9 Jan 2024 07:17:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 09 Jan 2024 07:17:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802634; x=1704889034; bh=qfyA/TsoLl ZVPSGIW+TMv0/5tVIPVO9g5JoS9Ua/DSo=; b=H5JtFk0hjMR2T/+RlXnf7FKyWX JU+7Uzv6xQrwKLJLE+5ytmKLNoH7FEDdv4fafbF3wFEqDegYwOAghJyWIHBPX7OX 1nG8MPYhUHIW1D/wXCHzOv5gx35NphlQFYWLPmbEggwVd9I3n5LVBNPDXvNNOOhJ 7jNPjIvIulYw6yCKDizC7SOeJzxWzT+O2EKxYGT/p59DEPup5DBcm+WF5M5idil8 LmgogVzy3SmQKVxDyOBY/kNjuklDswVy5ZQ9eRyFRezaj0qPSyLVi6Yb9LPYvru1 TwldsDMJfEcqdF5rW4ZGi2mvdUBQgEww4kStrXvWQQc2+9cKwDhas/Os50aQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802634; x=1704889034; bh=qfyA/TsoLlZVPSGIW+TMv0/5tVIP VO9g5JoS9Ua/DSo=; b=wDTQ1Ox/x4eZSua2JUYevmSghY6qb016XdwyyvVwGpmQ lAjabwIDH22uyYrDDI5AHQD36F4wlw55xh/Q3hbC3/fNafvTJXhZUKxUD9coDhcJ DdikzQiDuqmBQ1ZQxSJ85KV+kie902kU+MqtiPH0ZyXBvImjl1Nq9/C5ueKD9k78 Cik9Skw8q9BexVigNB55VYR93CcMLpEsK9eFY1uVZkptJIwx0L4R8UZDKaZ4YY1k iLZvQ7N251fi7yBO5Xd86Zwv+ChFZfj/xOkNOpv0P7D/un8DylKSCECAiNwb9RK2 Y606L1vHHJddmiLAsTx1NDJpYoO5eKBbdxaThsUAGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:14 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 532e71e3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:36 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:12 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 3/6] t1302: make tests more robust with new extensions Message-ID: <9af1e418d47730f503dabb271d30c848bf74fa0b.1704802213.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In t1302 we exercise logic around "core.repositoryFormatVersion" and extensions. These tests are not particularly robust against extensions like the newly introduced "refStorage" extension. Refactor the tests to be more robust: - Check the DEFAULT_REPO_FORMAT prereq to determine the expected repository format version. This helps to ensure that we only need to update the prereq in a central place when new extensions are added. - Use a separate repository to rewrite ".git/config" to test combinations of the repository format version and extensions. This ensures that we don't break the main test repository. - Do not rewrite ".git/config" when exercising the "preciousObjects" extension. Signed-off-by: Patrick Steinhardt --- t/t1302-repo-version.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh index 179474fa65..fb30c87e1b 100755 --- a/t/t1302-repo-version.sh +++ b/t/t1302-repo-version.sh @@ -28,7 +28,12 @@ test_expect_success 'setup' ' ' test_expect_success 'gitdir selection on normal repos' ' - test_oid version >expect && + if test_have_prereq DEFAULT_REPO_FORMAT + then + echo 0 + else + echo 1 + fi >expect && git config core.repositoryformatversion >actual && git -C test config core.repositoryformatversion >actual2 && test_cmp expect actual && @@ -79,8 +84,13 @@ mkconfig () { while read outcome version extensions; do test_expect_success "$outcome version=$version $extensions" " - mkconfig $version $extensions >.git/config && - check_${outcome} + test_when_finished 'rm -rf extensions' && + git init extensions && + ( + cd extensions && + mkconfig $version $extensions >.git/config && + check_${outcome} + ) " done <<\EOF allow 0 @@ -94,7 +104,8 @@ allow 1 noop-v1 EOF test_expect_success 'precious-objects allowed' ' - mkconfig 1 preciousObjects >.git/config && + git config core.repositoryformatversion 1 && + git config extensions.preciousObjects 1 && check_allow ' From patchwork Tue Jan 9 12:17:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514880 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 93FF338DD6 for ; Tue, 9 Jan 2024 12:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="Y+QVXIdi"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="h6iYqq9G" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E8E8B5C03AF for ; Tue, 9 Jan 2024 07:17:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 09 Jan 2024 07:17:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802638; x=1704889038; bh=tZRbjzl0QV dGeYESEJ0Jfn4Oba5mNumZdzbFyilPiBg=; b=Y+QVXIdiBM5cigCMOfDOVYdDQZ Q7nfqGJ5o05az5cLhEeHJd+ai0z0/RaWoF9qMovywjgMaXnsKNEgziWo99alx2vC zwxI6Rzzf/sR28VvzPxbP3nmW2qzXe3A/2smMRVUunEQBUfhPlpmQa5d2q6JX2sc WXSx2wi1Klaf0G9Kaw/kSiiQ/8Kf2NRnhaTy+Lk9VyFLlvZnRKQsfq2zapyMXUub +Yp0nouLpVzn/azho1XNftYEUfmqG28JD4kyEe95YT8yygCS9IfHdmqb56CboECC DCoqb2OX4qGNVi/uRm5cidEZ3XuDOGI/Z8p4weMQ3KzY9oH1+m8PsIXAfP8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802638; x=1704889038; bh=tZRbjzl0QVdGeYESEJ0Jfn4Oba5m NumZdzbFyilPiBg=; b=h6iYqq9GjMVt6PXw5hqQNdyfONCa9z1r3LkEcVANted1 VMmk3nnfRa9JNXApVGnQCpnlUEOEIVOedn8LZcaHYXn9svuz6ignFpQh3pITGGpR OmQUvP8paKEs2CkPk4ukC+UN65m9YTNiIQPUQGMv9w0PzxjN+tGOJbiM1Tsa2gUL 28sraOlLawJhEXcYgSVh43+XES3TzN1aww1rsQ3D3ybkXa0/mrW3VlIHwZqW9Moj 5BX8biUA8A0yY/yOY9tVKD6qSoQK2/9UljKA6vGZGpn5nZgVrsMzs4T22oQ42aIg FF4cbK100iKl+WCr2zn/VUDgmapXZS1tmInKa3qcuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgepudenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:18 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id b64e425c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:40 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:16 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 4/6] t1419: mark test suite as files-backend specific Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: With 59c35fac54 (refs/packed-backend.c: implement jump lists to avoid excluded pattern(s), 2023-07-10) we have implemented logic to handle excluded refs more efficiently in the "packed" ref backend. This logic allows us to skip emitting refs completely which we know to not be of any interest to the caller, which can avoid quite some allocaitons and object lookups. This was wired up via a new `exclude_patterns` parameter passed to the backend's ref iterator. The backend only needs to handle them on a best effort basis though, and in fact we only handle it for the "packed-refs" file, but not for loose references. Consequentially, all callers must still filter emitted refs with those exclude patterns. The result is that handling exclude patterns is completely optional in the ref backend, and any future backends may or may not implement it. Let's thus mark the test for t1419 to depend on the REFFILES prereq. Signed-off-by: Patrick Steinhardt --- t/t1419-exclude-refs.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t1419-exclude-refs.sh b/t/t1419-exclude-refs.sh index 5d8c86b657..1359574419 100755 --- a/t/t1419-exclude-refs.sh +++ b/t/t1419-exclude-refs.sh @@ -8,6 +8,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh +if test_have_prereq !REFFILES +then + skip_all='skipping `git for-each-ref --exclude` tests; need files backend' + test_done +fi + for_each_ref__exclude () { GIT_TRACE2_PERF=1 test-tool ref-store main \ for-each-ref--exclude "$@" >actual.raw From patchwork Tue Jan 9 12:17:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514881 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 96C5C38DD6 for ; Tue, 9 Jan 2024 12:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="hoNm4ox6"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="AKDBvHp5" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D82BB5C0400 for ; Tue, 9 Jan 2024 07:17:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 09 Jan 2024 07:17:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802643; x=1704889043; bh=m5R3HoFL0d k9vJhY1DFj0NRmlI2fN6ZQtMbQMNiUDYk=; b=hoNm4ox6cvpXzFVI5ossPNWNL6 JEvlHxYkJ8q3vo49vIggP/eRQMmmvqcZ3/gaeBRyYGe0wlJXgzkYD+pwfVbTNNOE W2w/8MPj/Mg32mm+LCOD13vWEAvGq5rE169LU7cGwfLEnZTZvcwaqdM9d4Apx7+M c3m98ZwABVj3MBMT6p/Tm1kn4YRaO4qQQIPaK8UQI/vRRwG2GPrF5xIXP9k8gVm7 uUYMS8I5sqQFPhBpAoQ2CyhT/ANsrtZ+HN9jIjWxNYsRGd8EvBr326C7trKA3pMo X2z6ZxoSBQD1llBAq2qGvHK3A1i6w0mYvyc+r8gwhhc43hBKGP50JGHwTwnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802643; x=1704889043; bh=m5R3HoFL0dk9vJhY1DFj0NRmlI2f N6ZQtMbQMNiUDYk=; b=AKDBvHp5Uv7dc2s/+03CMImFfVd3ZmeTtRUGz6QveOU3 MsPmcVmjLUfLn5uqq0HCMwdHo3lIumDtKnR7VLQ7bU/j28578JCRpP364COCrzGE cp3qvtWqqWANoVONRZ6cSVAnKUVoRtvrnVi2WN8lG2SCb2V29zvBCO/Pw26ix47y dpC5WZ54I1gpc46HwB1PJfK6529nqA53ulj+mgnuXNREBX9Vz52QQBwjtTttuMRt 8x7YHJ5fKBuUo7bVkjMceqxEqa2vFxrB8P/HtJNr7ZdjgYELBuOZCUAC86Js6ybM N5uwKzRA50c4xo0kdCkAZ49KbPOPfdpqzV+O6N4Hog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:23 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id fc6fbc86 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:44 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:21 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 5/6] t5526: break test submodule differently Message-ID: <51e494a50e4416ed0cbfd3c474ffcaf8b72e6ef4.1704802213.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In 10f5c52656 (submodule: avoid auto-discovery in prepare_submodule_repo_env(), 2016-09-01) we fixed a bug when doing a recursive fetch with submodule in the case where the submodule is broken due to whatever reason. The test to exercise that the fix works breaks the submodule by deleting its `HEAD` reference, which will cause us to not detect the directory as a Git repository. While this is perfectly fine in theory, this way of breaking the repo becomes problematic with the current efforts to introduce another refdb backend into Git. The new reftable backend has a stub HEAD file that always contains "ref: refs/heads/.invalid" so that tools continue to be able to detect such a repository. But as the reftable backend will never delete this file even when asked to delete `HEAD` the current way to delete the `HEAD` reference will stop working. Adapt the code to instead delete the objects database. Going back with this new way to cuase breakage confirms that it triggers the infinite recursion just the same, and there are no equivalent ongoing efforts to replace the object database with an alternate backend. Signed-off-by: Patrick Steinhardt --- t/t5526-fetch-submodules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index 7ab220fa31..5e566205ba 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526-fetch-submodules.sh @@ -771,7 +771,7 @@ test_expect_success 'fetching submodule into a broken repository' ' git -C dst fetch --recurse-submodules && # Break the receiving submodule - test-tool -C dst/sub ref-store main delete-refs REF_NO_DEREF msg HEAD && + rm -r dst/sub/.git/objects && # NOTE: without the fix the following tests will recurse forever! # They should terminate with an error. From patchwork Tue Jan 9 12:17:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13514882 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 BB4DB38DD6 for ; Tue, 9 Jan 2024 12:17:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="Q9Ol00LV"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="fvGZ0une" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C73DA5C040A for ; Tue, 9 Jan 2024 07:17:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 09 Jan 2024 07:17:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=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=fm2; t=1704802647; x=1704889047; bh=JLdKoPlrc5 jW0Cpx2Ws3HKBKhGoHfMLZNeBw3wpNJMM=; b=Q9Ol00LVdLYuIJjVXzRfsyrSnC cWHtt7VL6wFE4VoXOPseSFwxG0u6OBvNbmQkxDb33B6AguhyRwl2UxmTDd+0keDC jf+aDtwnNNJHVczAeJntbOBOBURZr0unfVvEuJw9yK3AKSmFdFiS9RUBmOtC7ttt 15vfRtFkPtjJiE09SO6LiAPOFZGO5KDkXQp4ztHzhbZchZZxTd0lNELmZYXyIHUG RX+5KCModZrEg4BYRqymoICwN5th9TVw011l6a902gDbvsn7qrQuU8/b5b2zwI5B IOMcGLANXmXWCkSgLuNGtu1QBxVPFkzjY/ebrjvEM2n8CuA3GRVOFZkwlkxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704802647; x=1704889047; bh=JLdKoPlrc5jW0Cpx2Ws3HKBKhGoH fMLZNeBw3wpNJMM=; b=fvGZ0uneVJdXHKEXGaGel70m/fs3k//P3+cHUCRR1t+z fswdQzATwROayDvuGb5xe4KPYZbqO4HTyLmMljkfuVJDT8soRKuifRQ13e31Gwrf iPzWPZby45i6lQOB0291NA99pf0Qmm6yIXwsvQUK+CPfVWcpWDesZN8tpfwuSyvk SuZyXPDbjLzMs3jMuHZooiGz9kyRWvZBnZ07AOHkI6AT6v4cSsrpQSEusbDWUm4X ZvTio5GjzQCRnL42kvj8whM4bxnZylk3edIEdRNHRoS3BXqKOUwwD7hkN4TCemoI ZglYljNQeX21VzwD6cnJ2cGL2nTFlcmtdTM9EaH8nw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehledgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgepudenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Jan 2024 07:17:27 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id e92365c3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 9 Jan 2024 12:14:48 +0000 (UTC) Date: Tue, 9 Jan 2024 13:17:25 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 6/6] t: mark tests regarding git-pack-refs(1) to be backend specific Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Both t1409 and t3210 exercise parts of git-pack-refs(1). Given that we must check the on-disk files to verify whether the backend has indeed packed refs as expected those test suites are deeply tied to the actual backend that is in use. Mark the test suites to depend on the REFFILES backend. Signed-off-by: Patrick Steinhardt --- t/t1409-avoid-packing-refs.sh | 6 ++++++ t/t3210-pack-refs.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/t/t1409-avoid-packing-refs.sh b/t/t1409-avoid-packing-refs.sh index f23c0152a8..7748973733 100755 --- a/t/t1409-avoid-packing-refs.sh +++ b/t/t1409-avoid-packing-refs.sh @@ -5,6 +5,12 @@ test_description='avoid rewriting packed-refs unnecessarily' TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh +if test_have_prereq !REFFILES +then + skip_all='skipping files-backend specific pack-refs tests' + test_done +fi + # Add an identifying mark to the packed-refs file header line. This # shouldn't upset readers, and it should be omitted if the file is # ever rewritten. diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index 7f4e98db7d..c0f1f9cfb7 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -15,6 +15,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh +if test_have_prereq !REFFILES +then + skip_all='skipping files-backend specific pack-refs tests' + test_done +fi + test_expect_success 'enable reflogs' ' git config core.logallrefupdates true '