From patchwork Mon Mar 10 23:16:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junio C Hamano X-Patchwork-Id: 14010856 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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 D5DA31DE4E9 for ; Mon, 10 Mar 2025 23:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648619; cv=none; b=EwwF+cPRoayELDTuRhwYNhi2JpiE9SjfoxhaceKRTlSfSXmxfhefBWC01ptoriPTk4lAJniPXUXrdouuNnxyqoQfOVjLPX46wAbHCxyBeJ284BtISvPDzk2Ck2AVxp11pGSDw2IX75AVixzO1HFYiJqweWm/A/qbLxu2AhwnbqY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648619; c=relaxed/simple; bh=FetDEzY9RnQTXc9T/j0KLAAbCScZsk8I+Nmd3UazVq4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UIKM826fAsIhR6Vu+kt/PkW+JdCHO2R9oJ8T/KW6rtJMLweUPerAlwGMFr2RvS5YTEd2RRj6MmNiANYDZ3I92X9EqxKnoY+LZvFrHbOFQp7DPiTysCKh4yTgtOuuHPdYCIg0DSkg9p5Cu8shcTYjTIqZowM05d4V+7hwhgDDnBM= 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=jGRBYPIN; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ixUUzxOj; arc=none smtp.client-ip=202.12.124.146 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="jGRBYPIN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ixUUzxOj" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id E957111401D5; Mon, 10 Mar 2025 19:16:55 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-12.internal (MEProxy); Mon, 10 Mar 2025 19:16:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1741648615; x= 1741735015; bh=m7ZHKoawOliuVuFL74IMD/GaQTgWWUPcZWjfRgtCYXQ=; b=j GRBYPINZSRTmh5FEvGWpUc3s7RCveg/ITT8YtfSVsxsb3nw9sd3/DL290bMs/1uF /VrVvGCaelZ36NFOXpMbQNtzkb+bUT78YWA7AmWEoCXhDcEAvXelbGm763K3yu5R AOypeGaluj+POBeBimf0CRaie1ZAkYKDQ4J4y0+aAnd6s3uOdv3fTMtw3dgQoA16 pmOsOvR2iDfOE4xA1rx73oc0wyyEe2UcS07FfuDqc2rn38rQ+KNACj7TQ5D2aSl+ 5FXgqFCqR6aDv2+e9H5P0jkhvkSa6Eo+SyMKe8rOheAQwujqyWsgbIWmezKdafpq qEQg3YoZ32MAtMlxQlu3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm1; t=1741648615; x=1741735015; bh=m7ZHKoawOliuVuFL74IMD/GaQTgW WUPcZWjfRgtCYXQ=; b=ixUUzxOjOnqWqyoKuVr8tUzF/0C5L4qjnd1Zkqqzq/lp oXfO8czB0K90ZCf9esKdA5LFr5wkRfkcZ7pqw1gjJ99GFnC1UE2sqVmBV7DcSyQB jS5UyOMSGL4/aGPwY8AZWFZJKpfWRXWMVSf5bKaoj7d6vKOSKUHe8qR+Rqipcf7C b06WgRWZ5Zsj8Q8AzVGHOszLhgCpSVL5fz2OVFFEH4UabxagpNx7XGRq+/2y4cG6 74KxE50wITs1srGAVmWvtEjbmEZud8TN7/PWwR9zDbsethK5y0chr5jy1eJnGgyx +CXRHCDLoBxMNE0UNk7gQOAenNP1xxRYh0v2aK8mTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddtieegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomheplfhunhhiohcuvecujfgrmhgr nhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrthhtvghrnheple evieefieeuffeugefhveeugefgfeevvdefleevuedvfedvudefkeehtdeftdegnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhithhsthgvrh esphhosghogidrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhope hgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 19:16:55 -0400 (EDT) From: Junio C Hamano To: git@vger.kernel.org Subject: [PATCH v1 1/4] t: introduce WITH_BREAKING_CHANGES prerequisite Date: Mon, 10 Mar 2025 16:16:49 -0700 Message-ID: <20250310231652.3742490-2-gitster@pobox.com> X-Mailer: git-send-email 2.49.0-rc2-173-g4d16673c2b In-Reply-To: <20250310231652.3742490-1-gitster@pobox.com> References: <20250310231652.3742490-1-gitster@pobox.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Earlier c5bc9a7f (Makefile: wire up build option for deprecated features, 2025-01-22) made an unfortunate decision to introduce the WITHOUT_BREAKING_CHANGES prerequisite to perform tests that ensure the historical behaviour that may be different from what we will have in the future. It would inevitably invite doulbe negation when we need to add tests to ensure the behaviour we want to have in the future. Introduce WITH_BREAKING_CHANGES prerequisite and replace the existing uses of WITHOUT_BREAKING_CHANGES prerequisite. Some in-flight topics that add more uses of WITHOUT_BREAKING_CHANGES would still need the old prerequisite, so let's keep its definition for now while we'll eradicate its use. Signed-off-by: Junio C Hamano --- t/t5323-pack-redundant.sh | 2 +- t/t5505-remote.sh | 6 +++--- t/t5515-fetch-merge-logic.sh | 2 +- t/t5516-fetch-push.sh | 8 ++++---- t/test-lib.sh | 5 +++++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh index 688cd9706c..bc30bc9652 100755 --- a/t/t5323-pack-redundant.sh +++ b/t/t5323-pack-redundant.sh @@ -36,7 +36,7 @@ relationship between packs and objects is as follows: . ./test-lib.sh -if ! test_have_prereq WITHOUT_BREAKING_CHANGES +if test_have_prereq WITH_BREAKING_CHANGES then skip_all='skipping git-pack-redundant tests; built with breaking changes' test_done diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index bb7e0c6879..82fccf8e36 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -1123,7 +1123,7 @@ Pull: refs/heads/main:refs/heads/origin Pull: refs/heads/next:refs/heads/origin2 EOF -test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/remotes' ' +test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/remotes' ' git clone one five && origin_url=$(pwd)/one && ( @@ -1149,7 +1149,7 @@ test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file i ) ' -test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches' ' +test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches' ' git clone --template= one six && origin_url=$(pwd)/one && ( @@ -1165,7 +1165,7 @@ test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file i ) ' -test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches (2)' ' +test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches (2)' ' git clone --template= one seven && ( cd seven && diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 4e6026c611..8ac04d742c 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -104,7 +104,7 @@ test_expect_success setup ' git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* && remotes="$remotes config-glob" && - if test_have_prereq WITHOUT_BREAKING_CHANGES + if ! test_have_prereq WITH_BREAKING_CHANGES then mkdir -p .git/remotes && cat >.git/remotes/remote-explicit <<-\EOF && diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 85ed049627..6e2b233157 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -975,7 +975,7 @@ test_expect_success 'allow push to HEAD of non-bare repository (config)' ' ! grep "warning: updating the current branch" stderr ' -test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches' ' +test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches' ' mk_empty testrepo && git branch second $the_first_commit && git checkout second && @@ -991,7 +991,7 @@ test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches' ' git checkout main ' -test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches containing #' ' +test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches containing #' ' mk_empty testrepo && mkdir testrepo/.git/branches && echo "..#second" > testrepo/.git/branches/branch2 && @@ -1005,7 +1005,7 @@ test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches containing #' git checkout main ' -test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches' ' +test_expect_success !WITH_BREAKING_CHANGES 'push with branches' ' mk_empty testrepo && git checkout second && @@ -1022,7 +1022,7 @@ test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches' ' ) ' -test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches containing #' ' +test_expect_success !WITH_BREAKING_CHANGES 'push with branches containing #' ' mk_empty testrepo && test_when_finished "rm -rf .git/branches" && diff --git a/t/test-lib.sh b/t/test-lib.sh index 9001ed3a64..12fe82f660 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1862,6 +1862,11 @@ test_lazy_prereq CURL ' curl --version ' +test_lazy_prereq WITH_BREAKING_CHANGES ' + test -n "$WITH_BREAKING_CHANGES" +' + +# DEPRECATED; DO NOT USE THIS IN NEW TESTS test_lazy_prereq WITHOUT_BREAKING_CHANGES ' test -z "$WITH_BREAKING_CHANGES" ' From patchwork Mon Mar 10 23:16:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junio C Hamano X-Patchwork-Id: 14010857 Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (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 CAA131F0991 for ; Mon, 10 Mar 2025 23:16:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.155 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648620; cv=none; b=kUTsiDB2bn97CyYH6LB27R/HnaFfSuuNRLrCyXjlLxeCjjTod7MW8Y74PeSG4utUHBNsVeCoiTfe9DwujVdO9H3c0EA3bc9qhuDE1qmH1JI5pGlxQPGvTRAmLU2K9WF6UQfyFjoHToVZVj5VvdhpR+HSzGFw60oWT3AoDlq6p80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648620; c=relaxed/simple; bh=NjY9MR8euWGyLTn//7RSXXhHxs/lddrF/h06yyXNf0c=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ML+CE+6voaNwLAu/hmzPiHwZjPmXgZUVW83KoN0WbE4f75mh1io5Zj2cX7a6SOJNBEWLelJe3psleCxTnuvzitmd26NRBkPMJYeMsKXDRSsIec7gXqGO1O6mClh13mvB4dLKMYxsGcBUpGGIJUatCngpZrY7+pj71yHyNUHEzoo= 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=dncshxw4; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=aFjrnMTN; arc=none smtp.client-ip=202.12.124.155 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="dncshxw4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="aFjrnMTN" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id EA44F2540251; Mon, 10 Mar 2025 19:16:57 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-01.internal (MEProxy); Mon, 10 Mar 2025 19:16:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1741648617; x= 1741735017; bh=50jsIWvnosGWhMUPiWAUzmkd+s6OCrH/7tYgcJhrlGw=; b=d ncshxw4e9YflepBcLq3JLUYXtRvwEggVDA9iQi9WT7ih/ETK0rgFTtRnTU2L3p69 6eViFkysD/pg+4upG8sLpuZclFqEu3HFzbkNK1FJfFrp2Ylq3dx3edzk8EN+jya0 9NhBy28WNEhSSrjR2EC1xL1Gtk1NoJ48LLu4Ui3WPtvW7O/tDAhSlV0A0P7Zo7A3 NCuhpq8/exJhaRFXpHptrdHZ9qBJ7TJAycpA9IVwRoq9vEA//n/tPt6rDSxeYSeu iSm3CrD597ZhQ8dF6vVHiNbdq6MIhJHoXKPmj5jJaQNGNoHMyfLTrbIzx4RvYBLU E5DriN8WPHuf+JupGr3UQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm1; t=1741648617; x=1741735017; bh=50jsIWvnosGWhMUPiWAUzmkd+s6O CrH/7tYgcJhrlGw=; b=aFjrnMTNm6MU68A7pY36ibtIJg+Knhu0+jM/1ExVoXno Ko6n6N7be4UMvOeQ5eMqwcM0DxlmW2jm68X2uXLCA+tILA7VMComf0gic/b+6kDq lb3ocfKKM3zTMzrVtBCUmz+3FD3xyIhSyDHVo6AUwe3iygdKiVrtQ/lE+BKAO9VA v12YddojarHZ41F51pnIpBPRUdOFvEqYUeBZZkWmcDHj8sMugES1SeeSu9nVoxEc l4i4ILKX/qU5r0++RJNImPVp5WFkOWvUD/KJOxE7MbiT295wzai4ciocgzd66KdZ bclMKHkPv8kmX04mGrM+61NruKk6DPNae+EPmY7v5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddtieehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomheplfhunhhiohcuvecujfgrmhgr nhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrthhtvghrnheple evieefieeuffeugefhveeugefgfeevvdefleevuedvfedvudefkeehtdeftdegnecuvehl uhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepghhithhsthgvrh esphhosghogidrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhope hgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 19:16:57 -0400 (EDT) From: Junio C Hamano To: git@vger.kernel.org Subject: [PATCH v1 2/4] t6120: avoid hiding "git" exit status Date: Mon, 10 Mar 2025 16:16:50 -0700 Message-ID: <20250310231652.3742490-3-gitster@pobox.com> X-Mailer: git-send-email 2.49.0-rc2-173-g4d16673c2b In-Reply-To: <20250310231652.3742490-1-gitster@pobox.com> References: <20250310231652.3742490-1-gitster@pobox.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 A handful of tests invoke "git" on the upstream side of a pipe, hiding its exit status. Correct them. Signed-off-by: Junio C Hamano --- t/t6120-describe.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 76843a6169..dcb526e37d 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -292,13 +292,15 @@ test_expect_success 'name-rev --annotate-stdin' ' echo "$rev ($name)" >>expect.unsorted || return 1 done && sort expect && - git rev-list --all | git name-rev --annotate-stdin >actual.unsorted && + git rev-list --all >list && + git name-rev --annotate-stdin actual.unsorted && sort actual && test_cmp expect actual ' test_expect_success 'name-rev --stdin deprecated' " - git rev-list --all | git name-rev --stdin 2>actual && + git rev-list --all >list && + git name-rev --stdin actual && grep -E 'warning: --stdin is deprecated' actual " From patchwork Mon Mar 10 23:16:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junio C Hamano X-Patchwork-Id: 14010858 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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 6B4B6221544 for ; Mon, 10 Mar 2025 23:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648621; cv=none; b=rYP+FJsESyoIzFRvlx1W0i83RPZtM5rjR9/UhND47eyK30km4nYa+gHu/TxAoO4qXSjSJVSX0Aui84ovXo5pHDWnIGbxcFvFBEUr82HitEmnwlW3bnVoJwgBlZtun9mR6jkAOtrjVl4w+1O7YFMXYQ2lpXznIyyLH9pjqzCQunU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648621; c=relaxed/simple; bh=AHY6yqq8I8Q6t4ApnwkfB0XZrd7nl/GJPXWvIUCk/Hs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VI7YBl+o1aUCp8DqokZTgobqUNlKiKfmaqik4KVyjIMNeK9FgC116yp0DYi+aI2cZz224DJxWHpmAes7Mx2iFoaUfaemF7tVXWtjqXLhgKxeKK4MmVyRoMbmilYtIspig1OiGIKXdr0rOspIGasq+usS0+cthzynzun8Bi7A7rc= 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=ZXWBEvKv; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Sk+8CmIh; arc=none smtp.client-ip=202.12.124.146 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="ZXWBEvKv"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Sk+8CmIh" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 8742B114022F; Mon, 10 Mar 2025 19:16:59 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-01.internal (MEProxy); Mon, 10 Mar 2025 19:16:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1741648619; x= 1741735019; bh=8oED9MxbrneP9B+6F7cbrHGr4h8nbNS8gH8EksJt/QQ=; b=Z XWBEvKvOfTKMRk6r+GfTRPaDnWDxg7o2iBG0A7H7gVkug8VGyarqTBd2QEwah9l6 WubkUOUxLMpBebIdiqCisNzoemwDJXtJQR0OvTqpFvmoojWIEVSfsuHG7I3eUb28 K+iL2xdYiiU34zGCpf266tSOEdewUn/QkxZuB8RYBYkJARjXaHwE/iV+BeyNOR3p R/KXNaBHySrJIWnuGVdrX1W4237V0UE/EIONTIlAGPiw2yPArQcsu+dv08PCYcvF uYSVAb1AlhFCML+BeycEAis/4OdfLtX0mPuKC8Srs/VLZI+0JonXlm/wDRg9CDZS XtsOJZk0BtV+S6X1bgwPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm1; t=1741648619; x=1741735019; bh=8oED9MxbrneP9B+6F7cbrHGr4h8n bNS8gH8EksJt/QQ=; b=Sk+8CmIhEy2Ad70rAnEIAb0n08/n6+/h89YtPfUJqDzb 9oQXMyiD78ULbLDEUW5MurYJb+C3zFPFKbNF9M/oW7+SG/6JZpu1tlzsd9mqr/I1 VYYzht7xvO2ZUkbYMdCPW6/3caYRwqhM76I7DERVLi9BM4LF0uDIC3GuAccqXTBQ TiOU7IT8IRO2g10+fT5t4LC/GNAZwHYtBV3ZrL4JnDo/USYnq5ZrXNZBS0ueM4om x0aG9OwcgwYJv/BFeB6s5pxjYquFiCULwDtTQxINzHZjhAvl6SatRRr0dj0OAYWq HgeTArnl5r894HQH5MzjDvFUVZO7qtYHv4Qn3S+Szw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddtieehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomheplfhunhhiohcuvecujfgrmhgr nhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrthhtvghrnheple evieefieeuffeugefhveeugefgfeevvdefleevuedvfedvudefkeehtdeftdegnecuvehl uhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepghhithhsthgvrh esphhosghogidrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhope hgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 19:16:58 -0400 (EDT) From: Junio C Hamano To: git@vger.kernel.org Subject: [PATCH v1 3/4] t6120: further modernize Date: Mon, 10 Mar 2025 16:16:51 -0700 Message-ID: <20250310231652.3742490-4-gitster@pobox.com> X-Mailer: git-send-email 2.49.0-rc2-173-g4d16673c2b In-Reply-To: <20250310231652.3742490-1-gitster@pobox.com> References: <20250310231652.3742490-1-gitster@pobox.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is absolutely no reason why a pattern given to grep to find 'warning: --stdin is deprecated' must be quoted within a pair of single quotes, or the pattern to look for the literal string as ERE. Quote the test body with a pair of single quotes like everybody else, and quote the needle string in a pair of double quotes. Also use test_grep instead of "grep -E". Signed-off-by: Junio C Hamano --- t/t6120-describe.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index dcb526e37d..71e261394a 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -298,11 +298,11 @@ test_expect_success 'name-rev --annotate-stdin' ' test_cmp expect actual ' -test_expect_success 'name-rev --stdin deprecated' " +test_expect_success 'name-rev --stdin deprecated' ' git rev-list --all >list && git name-rev --stdin actual && - grep -E 'warning: --stdin is deprecated' actual -" + test_grep "warning: --stdin is deprecated" actual +' test_expect_success 'describe --contains with the exact tags' ' echo "A^0" >expect && From patchwork Mon Mar 10 23:16:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junio C Hamano X-Patchwork-Id: 14010859 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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 28ADB1F0991 for ; Mon, 10 Mar 2025 23:17:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648623; cv=none; b=KTN8pyurSJ+jjj6Jl7tAMBxEw/XTCGhd0ujBPg3uxKWTNugVYifLylZAAyeylagk79hpDdiOhwbaCEmxBPXsojegbnGokIv9g3FGmu757gzsRlT/aOIlX8md/rLY0KQ2+kNc9fv2qNNojmMShL9gpYL1SwLFuhDnuzMbCnodupM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741648623; c=relaxed/simple; bh=n0271dI+mqJqih8xEW/ojnNzohEwVj4a/UCztLL+dM8=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dd2LQZS8UNNqriJPAfViCxxq4pBm6YA6zqQ8KnyG3MHViLipfE3lK+KON/BGiveSsFJjb3XFQ37yLAtfUbLqsJVd9+VA/LpXKVlLOoBI03sMnp8q2iVQvS9UqFZgqkD7qGb0eCCM0K9h4XCWJ4haP0jCO4BVNmV32e6/ALAnI/o= 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=ML019+Rp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=7y/qL2CR; arc=none smtp.client-ip=202.12.124.146 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="ML019+Rp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="7y/qL2CR" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 73D1B1140238; Mon, 10 Mar 2025 19:17:01 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-03.internal (MEProxy); Mon, 10 Mar 2025 19:17:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1741648621; x= 1741735021; bh=2wcTrmozMzmNFpCwSKMwlDGaOPyPFEl0qkGRYWcyyRM=; b=M L019+RpZOF+4UAh3MzfX5VA9UVYd5XmEAB/99pwwSSphTdkGfFqGeasX19b5oxaq Hb/oUrkdgvnc9+X8Pa/k9BYUDUKATkXC4lv3pXMp9AW7BzRmVwqoqqqt2bo30HNY meoOYI4q8J8UWuZUjR74rQHsyMeqp7VeLi9qmjsMAm/Gb91tX3s7b2rZVTPLm6a8 Xl7fwYR2BuXMfXlbP/h3lRESltQRIdqF1pK8QjMikfmOfeRfHZnP1EZ5OV9RmesX UGgKAqgK0Et8378lzssuDQ7ThEXvBXIVrJKwdJbop6oAeilLEtmGHJPdz8c8YOfp bjHxfE3GIIJsL8L9Np2GQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm1; t=1741648621; x=1741735021; bh=2wcTrmozMzmNFpCwSKMwlDGaOPyP FEl0qkGRYWcyyRM=; b=7y/qL2CRUjKPW+tQEmzmp35jJuKTKLiJdbdpIbxTSNbX vtO8R9Dxl93WO2hfg5oJkikYEmSnPxC4MzMtoTAmjJ3sFACVGmO6NybarBTL1Lw2 GBy78NpC3oEprnPOlKCyfD4ffOF5fOSbTULPrLQZCfPbROOKBlAuLtmmmWGi1HwP 7GwLdIu1dNBVFWF44BZz+Am+CG1XlXKHgGbHEb9xhtOFnSvNkBPKlIXhQ5+yUVGc vLm/Bp2q9PmiFHa+4ycb3TveRh9b75o6/i0hJ4F2c8HSmpVMOaS3wdpdvf0wl+iT L5nJqGf/cQ1EQJFQPpoTPOX/UQukfkDwf0gtmqyP0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddtieehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkofgjfhgggfestdekredtredttdenucfhrhhomheplfhunhhiohcuvecujfgrmhgr nhhouceoghhithhsthgvrhesphhosghogidrtghomheqnecuggftrfgrthhtvghrnheple evieefieeuffeugefhveeugefgfeevvdefleevuedvfedvudefkeehtdeftdegnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhithhsthgvrh esphhosghogidrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhope hgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 19:17:00 -0400 (EDT) From: Junio C Hamano To: git@vger.kernel.org Subject: [PATCH v1 4/4] name-rev: remove "--stdin" support Date: Mon, 10 Mar 2025 16:16:52 -0700 Message-ID: <20250310231652.3742490-5-gitster@pobox.com> X-Mailer: git-send-email 2.49.0-rc2-173-g4d16673c2b In-Reply-To: <20250310231652.3742490-1-gitster@pobox.com> References: <20250310231652.3742490-1-gitster@pobox.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As part of Git 3.0, remove the hidden synonym for "--annotate-stdin" for real. As this does not change the fact that it used to be called "--stdin" in older version of Git, keep that passage in the documentation for "--annotate-stdin". Signed-off-by: Junio C Hamano --- Documentation/BreakingChanges.adoc | 6 ++++++ builtin/name-rev.c | 2 ++ t/t6120-describe.sh | 10 ++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc index bdfad29d8a..61bdd586b9 100644 --- a/Documentation/BreakingChanges.adoc +++ b/Documentation/BreakingChanges.adoc @@ -178,6 +178,12 @@ references. + These features will be removed. +* Support for "--stdin" option in the "name-rev" command was + deprecated (and hidden from the documentation) in the Git 2.40 + timeframe, in preference to its synonym "--annotate-stdin". Git 3.0 + removes the support for "--stdin" altogether. + + == Superseded features that will not be deprecated Some features have gained newer replacements that aim to improve the design in diff --git a/builtin/name-rev.c b/builtin/name-rev.c index beac166b5c..3f49138551 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -578,11 +578,13 @@ int cmd_name_rev(int argc, N_("ignore refs matching ")), OPT_GROUP(""), OPT_BOOL(0, "all", &all, N_("list all commits reachable from all refs")), +#ifndef WITH_BREAKING_CHANGES OPT_BOOL_F(0, "stdin", &transform_stdin, N_("deprecated: use --annotate-stdin instead"), PARSE_OPT_HIDDEN), +#endif /* WITH_BREAKING_CHANGES */ OPT_BOOL(0, "annotate-stdin", &annotate_stdin, N_("annotate text from stdin")), OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")), OPT_BOOL(0, "always", &always, diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 71e261394a..256ccaefb7 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -300,8 +300,14 @@ test_expect_success 'name-rev --annotate-stdin' ' test_expect_success 'name-rev --stdin deprecated' ' git rev-list --all >list && - git name-rev --stdin actual && - test_grep "warning: --stdin is deprecated" actual + if ! test_have_prereq WITH_BREAKING_CHANGES + then + git name-rev --stdin actual && + test_grep "warning: --stdin is deprecated" actual + else + test_must_fail git name-rev --stdin actual && + test_grep "unknown option .stdin." actual + fi ' test_expect_success 'describe --contains with the exact tags' '