From patchwork Mon Jan 6 07:51:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13927000 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.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 2B1CD2AD16 for ; Mon, 6 Jan 2025 07:51:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149903; cv=none; b=CmLgGBPEobnovA1tenXirI5hHZfH8SdFm5GYhHyq0KSJlLMecnGZenwC6DtkyQy0gbz6I9Cv+QfINAsRygQlZlCBE8Far4SMhNiIigvcJXcV//Kn0cRw64VBGsLd/m/vie3DeMmXIY5qOa3KM0zTTrIUtZr9fSsHipiaVjFv0Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149903; c=relaxed/simple; bh=6/d8HKyONtaoDaBghz3bz0IKRdb4zXPUnOYm3wsbPu4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=V3iAiB2HyIHOlHCA10rK/JnyVV/wexSuzJwOttK0wfCUSbSssWF4u+pRxvW5Lcye6s+TKOTD2r7r8riwT4e7V/mcu5rzvZF5Ikwh+gBk4ZmNmGgMapctGnMTf9KxT6bZuXdBZxsQ0uC69NgIZTE3GRfL4MelSi28LI88+rkHt7E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=OY+hdAMa; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=yRPOa4BX; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="OY+hdAMa"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="yRPOa4BX" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 3D90D1380938; Mon, 6 Jan 2025 02:51:40 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 06 Jan 2025 02:51:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding: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=1736149900; x=1736236300; bh=OTtQDdzEpB8FXaFh85brj1zxNtIyL7VOHrKk8TfMTks=; b= OY+hdAMaQgykjhXlN/xyQivMwqIMEI5xB9H88yVhuz2tkeHG3sqgvbOGK9bKCR7c jXtCE/iQr55lsxoEmwrZxLLw/3xnqIIdBz8bJKIB8ygHYXgMIMU3dNg9hqmhFpMy +YHlRglIt5SgTUhqthus68/NvzJ50J72q16iWPqTka6DmoFYQteZKweCeM/xB+HE aBLDU9pgUoDvxJO5UYFA1InxS64HUsKNLSo0uYBQjqrB4TPRrvdD5S+KwXAV2x+w 2nYDfqQyo4D6Bhd2OUkKSlexqKWHdV7a1Fldahp38Vab6Nsi+lX9hNf96RiRU/J2 GS2GvkB7B4GhKlMA+CIYHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1736149900; x= 1736236300; bh=OTtQDdzEpB8FXaFh85brj1zxNtIyL7VOHrKk8TfMTks=; b=y RPOa4BXpSjU3Mb+SRI5nkcCvucFRF99n73OgTliBNB0L5jQYDOZguUQGcLtrxwib SUVi9PwtJqq3EMNzotr+p4y9UnBZN1HvnUykBeDQPtmwxShSGcfhuCbXnKkMG6OS GmuIJW1Gfr90RR8+d4u+quF0Dc6cCbtEaQDIZQwTtXwYc433xBSVCLbQH/E2uGu1 pjP26O2c4C53onwDA0weyEyfoWpa8iNsh9LyMpX1UUQQXl7d7c3On9gkmr/s9jJH Pq1gBeXJ8iR/84Zrr8CQwPSz/0F49eJNZw3QxhqzD+z2po6L2CPWj2ubFtXFcrpQ sTlePjg9+mR2gOn4WYNVA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefledguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 02:51:39 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 9f280bcc (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 6 Jan 2025 07:51:38 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 06 Jan 2025 08:51:33 +0100 Subject: [PATCH v2 1/5] Makefile: wire up build option for deprecated features Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250106-pks-remote-branches-deprecation-v2-1-2ce87c053536@pks.im> References: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> In-Reply-To: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" X-Mailer: b4 0.14.2 With 57ec9254eb (docs: introduce document to announce breaking changes, 2024-06-14), we have introduced a new document that tracks upcoming breaking changes in the Git project. In 2454970930 (BreakingChanges: early adopter option, 2024-10-11) we have amended the document a bit to mention that any introduced breaking changes must be accompanied by logic that allows us to enable the breaking change at compile-time. While we already have two breaking changes lined up, neither of them has such a switch because they predate those instructions. Introduce the proposed `WITH_BREAKING_CHANGES` preprocessor macro and wire it up with both our Makefiles and Meson. Signed-off-by: Patrick Steinhardt --- GIT-BUILD-OPTIONS.in | 1 + Makefile | 5 +++++ contrib/buildsystems/CMakeLists.txt | 1 + meson.build | 6 ++++++ meson_options.txt | 2 ++ t/test-lib.sh | 4 ++++ 6 files changed, 19 insertions(+) diff --git a/GIT-BUILD-OPTIONS.in b/GIT-BUILD-OPTIONS.in index f651116102ae2977622dccd12b199fe7ad65af99..f1d0ecf123031dd13232cc63e100da528bfea16a 100644 --- a/GIT-BUILD-OPTIONS.in +++ b/GIT-BUILD-OPTIONS.in @@ -45,3 +45,4 @@ GITWEBDIR=@GITWEBDIR@ USE_GETTEXT_SCHEME=@USE_GETTEXT_SCHEME@ LOCALEDIR=@LOCALEDIR@ BROKEN_PATH_FIX=@BROKEN_PATH_FIX@ +WITH_BREAKING_CHANGES=@WITH_BREAKING_CHANGES@ diff --git a/Makefile b/Makefile index 06f01149ecf399ae4bb1932188a007948d767283..dc3c980aa7a4f42d27ed72415a636ac82b2a5684 100644 --- a/Makefile +++ b/Makefile @@ -2230,6 +2230,10 @@ ifdef FSMONITOR_OS_SETTINGS COMPAT_OBJS += compat/fsmonitor/fsm-path-utils-$(FSMONITOR_OS_SETTINGS).o endif +ifdef WITH_BREAKING_CHANGES + BASIC_CFLAGS += -DWITH_BREAKING_CHANGES +endif + ifeq ($(TCLTK_PATH),) NO_TCLTK = NoThanks endif @@ -3187,6 +3191,7 @@ GIT-BUILD-OPTIONS: FORCE -e "s|@USE_GETTEXT_SCHEME@|\'$(USE_GETTEXT_SCHEME)\'|" \ -e "s|@LOCALEDIR@|\'$(localedir_SQ)\'|" \ -e "s!@BROKEN_PATH_FIX@!\'$(BROKEN_PATH_FIX)\'!" \ + -e "s|@WITH_BREAKING_CHANGES@|\'$(WITH_BREAKING_CHANGES)\'|" \ GIT-BUILD-OPTIONS.in >$@+ @if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 49904ca8a93981c514540bad5efa6833ddd14426..63d008892848c20d5937d9a624a480f700b19498 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -1198,6 +1198,7 @@ string(REPLACE "@GITWEBDIR@" "'${GITWEBDIR}'" git_build_options "${git_build_opt string(REPLACE "@USE_GETTEXT_SCHEME@" "" git_build_options "${git_build_options}") string(REPLACE "@LOCALEDIR@" "'${LOCALEDIR}'" git_build_options "${git_build_options}") string(REPLACE "@BROKEN_PATH_FIX@" "" git_build_options "${git_build_options}") +string(REPLACE "@WITH_BREAKING_CHANGES@" "" git_build_options "${git_build_options}") if(USE_VCPKG) string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n") endif() diff --git a/meson.build b/meson.build index 0dccebcdf16b07650d943e53643f0e09e2975cc9..316cd9326437876828a88d96a1bc93d503199900 100644 --- a/meson.build +++ b/meson.build @@ -644,6 +644,12 @@ build_options_config.set('GIT_TEST_UTF8_LOCALE', '') build_options_config.set_quoted('LOCALEDIR', fs.as_posix(get_option('prefix') / get_option('localedir'))) build_options_config.set('GITWEBDIR', fs.as_posix(get_option('prefix') / get_option('datadir') / 'gitweb')) +if get_option('breaking_changes') + build_options_config.set('WITH_BREAKING_CHANGES', 'YesPlease') +else + build_options_config.set('WITH_BREAKING_CHANGES', '') +endif + if get_option('sane_tool_path') != '' build_options_config.set_quoted('BROKEN_PATH_FIX', 's|^\# @BROKEN_PATH_FIX@$|git_broken_path_fix "' + get_option('sane_tool_path') + '"|') else diff --git a/meson_options.txt b/meson_options.txt index 32a72139bae870745d9131cc9086a4594826be91..800e518d959c4143812f8840415b99a593667a8d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -43,6 +43,8 @@ option('sha256_backend', type: 'combo', choices: ['openssl', 'nettle', 'gcrypt', description: 'The backend used for hashing objects with the SHA256 object format') # Build tweaks. +option('breaking_changes', type: 'boolean', value: false, + description: 'Enable upcoming breaking changes.') option('macos_use_homebrew_gettext', type: 'boolean', value: true, description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.') diff --git a/t/test-lib.sh b/t/test-lib.sh index 62dfcc4aaf959d0cf066d07663d939e14f92485c..6e423f655d35adf5a2d4f8b3a78d9e8c1119caab 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1864,6 +1864,10 @@ test_lazy_prereq CURL ' curl --version ' +test_lazy_prereq WITHOUT_BREAKING_CHANGES ' + test -z "$WITH_BREAKING_CHANGES" +' + # SHA1 is a test if the hash algorithm in use is SHA-1. This is both for tests # which will not work with other hash algorithms and tests that work but don't # test anything meaningful (e.g. special values which cause short collisions). From patchwork Mon Jan 6 07:51:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13927001 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.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 0F1512AEFE for ; Mon, 6 Jan 2025 07:51:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149903; cv=none; b=aX8bunVJZbD8FCKjjDRnyDGAAQq6ZhRU8C0WGwOZiuxAMC8kCczREBq95o3CZlZ6efTUbqdGM7B/rYyz+GxuW6EZUidaFJYARHCIp8MIoDUbRh+cI0Tu46iVT5gxg2anna1fd1UjJRk92a9ZGjd5u0WQ0xo0xcpYYKuMTo1LNUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149903; c=relaxed/simple; bh=ZI4o0Vqy0nP/FNI/WSmzrXrjtpSQwqvI48Z5RvE0sOE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XlCznAAN4sdU25RZmx5cDVlcI9owQPbbvBRhfg724hjozVi6k1FxQWGwSFL7NU8S7r7sQWsu9DGqaX1dIT+CDbcbfJMA3DIJI767OURTaST0/NMsDUXu9JVpQK2Jcfrs4Ioezm/rEpXOYyxaF5OBytyYV9YzuZdD1y46ubHahbA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Y2Objk/z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hFub+nqO; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="Y2Objk/z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hFub+nqO" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 2F29B138093F; Mon, 6 Jan 2025 02:51:41 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Mon, 06 Jan 2025 02:51:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding: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=1736149901; x=1736236301; bh=TFW+ddQq6ZpTbtUkVocrRy1i6xtBKPscLEWKEohT1O4=; b= Y2Objk/zHdmhkYtVRVFQvR2Nf9nwXW3iL6snKf7ocE+ckJBkrjMRDO9Y/CxJQqT/ UhMJzSij89xma43wtabCYTSAwHtG+Ta8eWUC5wovnjuF2amIYDkWHNQDrHKtS+Yj Y+X3lwNF9aulqylNpYtDMioFSSHDC4hOLkFAFKhLu5rkvx3Cs8gf6fZaJ/X9nf4y TO9koIqg+mrGlZxZa3AcWZ6gT4+1z4RDTfCWYp634ggbhub0AbLZSO0J854dk8LT M0/W546wDAdMhn50GuDC50WjSh4DlxN9+p6LuzYyJn681kr4rTwxs5vyzpfvzRxB LL9MT4NNp7mHAWqkU+wocA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1736149901; x= 1736236301; bh=TFW+ddQq6ZpTbtUkVocrRy1i6xtBKPscLEWKEohT1O4=; b=h Fub+nqOXMRNi3iQGTLIGhFW8zcCmbn7kzPCq83nfAMAFr2pyOXI0IzkySuUWqv+K bX5I/YrXVAmhPVV1RcLFCXT9AKjIhU+B76Q/Ei5/8uvw1DCjOPkNqGal5Kcd/q1Y OL9KOzJ8uqC/XEkBr606U8WZu0CPV2okfzebB5qlzoJYPRjRMzXMkoQc9lEgvYev T2D1zvyw05FHs/YRBKruU4MMzLxeihid1GVNEx30j0Dk8X1mNpQHZP+7v9fNQQrH tjhZxWIQZQtvROdQac0t+tQJCMm6ZTkl4BU3TVSYNQvyG+EVVHI9hFxsi85S+yXi 6ALvVJMkkWqrqWRyrUKXA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefledguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtoh hmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 02:51:40 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a9775e31 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 6 Jan 2025 07:51:39 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 06 Jan 2025 08:51:34 +0100 Subject: [PATCH v2 2/5] ci: merge linux-gcc-default into linux-gcc Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250106-pks-remote-branches-deprecation-v2-2-2ce87c053536@pks.im> References: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> In-Reply-To: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" X-Mailer: b4 0.14.2 The "linux-gcc-default" job is mostly doing the same as the "linux-gcc" job, except for a couple of minor differences: - We use an explicit GCC version instead of the default version provided by the distribution. We have other jobs that test with "gcc-8", making this distinction pointless. - We don't set up the Python version explicitly, and instead use the default Python version. Python 2 has been end-of-life for quite a while now though, making this distinction less interesting. - We set up the default branch name to be "main" in "linux-gcc". We have other testcases that don't and also some that explicitly use "master". So overall, the job does not add much to our test coverage. Merge it into our "linux-gcc" job to reduce our test matrix a bit. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 4 ---- .gitlab-ci.yml | 4 ---- ci/lib.sh | 5 ----- 3 files changed, 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 808ddc19b8a799abc414c6d6ba078a6e5be6bdfb..32d35d2257812f02121b20c3cae342d626481553 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -271,7 +271,6 @@ jobs: pool: ubuntu-latest - jobname: linux-gcc cc: gcc - cc_package: gcc-8 pool: ubuntu-20.04 - jobname: linux-TEST-vars cc: gcc @@ -286,9 +285,6 @@ jobs: - jobname: osx-gcc cc: gcc-13 pool: macos-13 - - jobname: linux-gcc-default - cc: gcc - pool: ubuntu-latest - jobname: linux-leaks cc: gcc pool: ubuntu-latest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1bc92893f27d6dd404133686b71c8061e55618c..b86bb0bdb3363e06e6fe4195c34babd67cf7e8cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,14 +46,10 @@ test:linux: - jobname: linux-gcc image: ubuntu:20.04 CC: gcc - CC_PACKAGE: gcc-8 - jobname: linux-TEST-vars image: ubuntu:20.04 CC: gcc CC_PACKAGE: gcc-8 - - jobname: linux-gcc-default - image: ubuntu:latest - CC: gcc - jobname: linux-leaks image: ubuntu:latest CC: gcc diff --git a/ci/lib.sh b/ci/lib.sh index 930f98d7228166c37c236beb062b14675fb68ef3..e67c481d4fe08d0ebc3253a7a832a96f65c79ffe 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -328,11 +328,6 @@ export SKIP_DASHED_BUILT_INS=YesPlease case "$distro" in ubuntu-*) - if test "$jobname" = "linux-gcc-default" - then - break - fi - # Python 2 is end of life, and Ubuntu 23.04 and newer don't actually # have it anymore. We thus only test with Python 2 on older LTS # releases. From patchwork Mon Jan 6 07:51:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13927002 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 0415C1D5CD7 for ; Mon, 6 Jan 2025 07:51:42 +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=1736149904; cv=none; b=RApt/nkB4j9pSxPbWoAPwR2PMsZmdWTfDi9wGhBLhxppLWUn1S5OEg0S2GTPkfKp2xD8HWilrWPmxWMajTlZNcK9p7EiHLo2ezHdxMc9KbDU8M0bTtPpdiM+LEIbOT7gxA/S57u44tn61Kes1LeROxOB2GXhpr/54VLfPkIVlmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149904; c=relaxed/simple; bh=vTzurRRouIYNVNs3LnejtWD0W7f9dT3974KQhP/wnsI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Svk4gQ7vNx9dPxZzrMg1xGxXxxiKzXwrc2ytz388WghPK7NsdkA6a33eOgzw9gdSC1hGyoJYX7kQYG22y63E+QHQotC2IDCCBUPQhx+0n8LTpxCWFLMrAHvk+930J082Q9BUizyELyPzpiNSaRcmr31YizgEjGqPV4i7CB9MGOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=aB3eqB6T; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=H7AR0xdk; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="aB3eqB6T"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="H7AR0xdk" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2176D11405C1; Mon, 6 Jan 2025 02:51:42 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Mon, 06 Jan 2025 02:51:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding: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=1736149902; x=1736236302; bh=TlHKbctS5EeAsPPta1NHmgt4mYmaZIkJCRdhtVu+/1E=; b= aB3eqB6T6UD6vjUIrpzJgnNdK/TnGvlt28L0AAJYlxfIF2o3nM5b+659D2fX5u/3 Yr/TdnRHIadvLQ46Erw+hpAVnZg7MFmJ1hsX1IHV1aHOu5hLUaP8Ss2bkxLrKn8N FKgGQdtfh1IcDK6FQ12RlsMAoMx8y+lLON5yc+Ce4SzT5Ye3gQ8WEpvCmmIKrGj6 N0SIibUKX+7ziuj8HHRF9uLpBmHRsJC/C/p2a9xhg/mk+pPwhqKE+5vpOU1X+4ee FiBRLolp1cKkVfvAeF1pQOCAy5bHbiUyO0h6EYoJpsaJSJo0GV6V/k4HkxFp27HD ZQMxYmr4ftMOLp7iQCjM+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1736149902; x= 1736236302; bh=TlHKbctS5EeAsPPta1NHmgt4mYmaZIkJCRdhtVu+/1E=; b=H 7AR0xdku2wxDUGFCGBoX0dtRAaq2YEgpe1ZLXmGq9gow6CSuV5TmHgGtTvY9rwcy 0v4ISFkI3uS1F1g7fpuHUFKFT9Qs4lpMND4xsEmhp2GHaS+9B0tbdT1CxlYBpgDy YPwK4Rn5/G5W2Tv/IX4KKIlOic5Vz+pbA5i7sO8cuVZlpJJyR2Hk9Lw3LtCHvA/U bhS9dhPcjirLbhAS/iiXuNVAiWHFM8Q6MXhgkudE1OBlEnHW4HyOJ6O+d2y4e6Pd 1KwL8pIY+21c7ksKqd9WbfkLjU1KUhN9hY7/Gaet3V5qOliNXKYkLiAyoWOufRzu WKLquDZkpzG76CaoCnCHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefledguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 02:51:41 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 90f4ae7a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 6 Jan 2025 07:51:40 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 06 Jan 2025 08:51:35 +0100 Subject: [PATCH v2 3/5] ci: repurpose "linux-gcc" job for deprecations Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250106-pks-remote-branches-deprecation-v2-3-2ce87c053536@pks.im> References: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> In-Reply-To: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" X-Mailer: b4 0.14.2 The "linux-gcc" job isn't all that interesting by itself and can be considered more or less the "standard" job: it is running with a reasonably up-to-date image and uses GCC as a compiler, both of which we already cover in other jobs. There is one exception though: we change the default branch to be "main" instead of "master", so it is forging ahead a bit into the future to make sure that this change does not cause havoc. So let's expand on this a bit and also add the new "WITH_BREAKING_CHANGES" flag to the mix. Rename the job to "linux-breaking-changes" accordingly. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 2 +- .gitlab-ci.yml | 2 +- ci/run-build-and-tests.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32d35d2257812f02121b20c3cae342d626481553..46b96fb96cc6e2659fe0b4b640f7e671587d059a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -269,7 +269,7 @@ jobs: - jobname: linux-reftable cc: clang pool: ubuntu-latest - - jobname: linux-gcc + - jobname: linux-breaking-changes cc: gcc pool: ubuntu-20.04 - jobname: linux-TEST-vars diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b86bb0bdb3363e06e6fe4195c34babd67cf7e8cc..492e5d9082dbdb3389c173f2b5a45fe43f4bea41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ test:linux: - jobname: linux-reftable image: ubuntu:latest CC: clang - - jobname: linux-gcc + - jobname: linux-breaking-changes image: ubuntu:20.04 CC: gcc - jobname: linux-TEST-vars diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 2e28d02b20f2469afddc4e04fdbd18465babb1ef..2ccd812fb4e025be3b8e9ab2ec6ae44e92944ab0 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -13,8 +13,9 @@ esac run_tests=t case "$jobname" in -linux-gcc) +linux-breaking-changes) export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main + export WITH_BREAKING_CHANGES=YesPlease ;; linux-TEST-vars) export GIT_TEST_SPLIT_INDEX=yes From patchwork Mon Jan 6 07:51:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13927003 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 010A91D6DA9 for ; Mon, 6 Jan 2025 07:51:43 +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=1736149905; cv=none; b=Tzs41tX1HAYQAtko/u+DRk+3NaUBIARYrzvjHnD498Yh/hzpGfvPxL34R5WVutwO001Bra4ISt/9q2CGV5gLNExg/kiuDMZiatnw6PDtbrLDHw/P4lufVlGFby/5btczjTF5mFmHqQXh9ooY7+09pI38wbcQ30IE5fo+53e5wTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149905; c=relaxed/simple; bh=xxWzgQPuaLofyomp8vAxfneALb8zRfEwR6b4kRe1y/4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uGGdeEH3qzngEkaYS/TiW40NEBDhIFfkyqaUUosMyU1COEKIyZHlmyszmho3TRLIrc4xHGLQE+yzTJdJgpCU+AV5NG5o/BNNqbI2SDj0V2oIwz+ABQ2I/LqMFC7ikhbMMwEatn4sD1GoT8/BnsdKqLjkCkP5dHVOjEvvsY2lRvY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Ssa9vKtl; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gDimeJPR; arc=none smtp.client-ip=103.168.172.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="Ssa9vKtl"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gDimeJPR" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 17AA111405C2; Mon, 6 Jan 2025 02:51:43 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Mon, 06 Jan 2025 02:51:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding: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=1736149903; x=1736236303; bh=eqqY8LHio88BRcUhsFkwGEPLafQ0cBHf/5dcK7YyGls=; b= Ssa9vKtlcXItPIapHXrnQSRj7Pg0johtA3aJ18GTc2tszosgBxZOdVAHY3gUaUkg J1DrCzwwZ6CCyR9L8BJfzhtIrOaQMrNwBJsGoyvvw4Stq6wtpO24kRG9dSKwfCbm hIiEkDe4Y+cdFWgdRgjE35rmgT6bj8pi68E/nG3G3CC6VID+M+cebiZkW3+jlBaa HG0T34K3/geUz6C35quF68biMY9BPt4XN5vF49VNS9F7lHphmewIibPKzFLwuDhK 6ZxVB1UEYLEMnolQp4INpZzlZSnK/WlFJDXu8TV7vxBwZQRDjIX6VBe4CjTRjcR+ AKdOQE2B910hWfasAt0NLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1736149903; x= 1736236303; bh=eqqY8LHio88BRcUhsFkwGEPLafQ0cBHf/5dcK7YyGls=; b=g DimeJPRVWx/H3wyJES1H8wAJU++yWMxCpn33rE4GBJdiGof03M+ukKRy0mfKk8qf bnmcJqNBvRcP4HxkrbmN03GFs41XAnCzXSNytbMjWsrh9zxCHGIoP3HM3sJVcs7E YAv0KIyuWjIbKZx5i6/K/OJHnSZpLNyuO5dCC8dDCgllfkbi+ZsC79bDqOVYswbG 7Wjt7B0IiLTQLLLR4MLmvpCF+J2V2nhemszbi6FEK1k17yxkGe5hBLbd6PWe5lPZ typBvL60MoySErLFRY1WkdqThEpYjm4U7GUxgPW6q2ZTE23hSQULSSC+q8TCAtpr PT8IMqN1SUODPGtiO3ftQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefledgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtoh hmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 02:51:42 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 34499e2c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 6 Jan 2025 07:51:41 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 06 Jan 2025 08:51:36 +0100 Subject: [PATCH v2 4/5] builtin/pack-redundant: remove subcommand with breaking changes Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250106-pks-remote-branches-deprecation-v2-4-2ce87c053536@pks.im> References: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> In-Reply-To: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" X-Mailer: b4 0.14.2 The git-pack-redundant(1) subcommand has been announced for removal with 53a92c9552 (Documentation/BreakingChanges: announce removal of git-pack-redundant(1), 2024-09-02). Stop compiling the subcommand in case the `WITH_BREAKING_CHANGES` build flag is set. Signed-off-by: Patrick Steinhardt --- Makefile | 2 ++ git.c | 2 ++ t/t5323-pack-redundant.sh | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/Makefile b/Makefile index dc3c980aa7a4f42d27ed72415a636ac82b2a5684..e6b0d859803ac4d53079ec2a39143441a5662203 100644 --- a/Makefile +++ b/Makefile @@ -1278,7 +1278,9 @@ BUILTIN_OBJS += builtin/mv.o BUILTIN_OBJS += builtin/name-rev.o BUILTIN_OBJS += builtin/notes.o BUILTIN_OBJS += builtin/pack-objects.o +ifndef WITH_BREAKING_CHANGES BUILTIN_OBJS += builtin/pack-redundant.o +endif BUILTIN_OBJS += builtin/pack-refs.o BUILTIN_OBJS += builtin/patch-id.o BUILTIN_OBJS += builtin/prune-packed.o diff --git a/git.c b/git.c index 46b3c740c5d665388917c6eee3052cc3ef8368f2..a13c32bcdc694460fcafe8079d3aa6e8caea1b4c 100644 --- a/git.c +++ b/git.c @@ -589,7 +589,9 @@ static struct cmd_struct commands[] = { { "name-rev", cmd_name_rev, RUN_SETUP }, { "notes", cmd_notes, RUN_SETUP }, { "pack-objects", cmd_pack_objects, RUN_SETUP }, +#ifndef WITH_BREAKING_CHANGES { "pack-redundant", cmd_pack_redundant, RUN_SETUP | NO_PARSEOPT }, +#endif { "pack-refs", cmd_pack_refs, RUN_SETUP }, { "patch-id", cmd_patch_id, RUN_SETUP_GENTLY | NO_PARSEOPT }, { "pickaxe", cmd_blame, RUN_SETUP }, diff --git a/t/t5323-pack-redundant.sh b/t/t5323-pack-redundant.sh index 8dbbcc5e51c06d7c5f56fcb3107860fcb66a5106..688cd9706c876a7edcaf0bcd642ae08ece188d4d 100755 --- a/t/t5323-pack-redundant.sh +++ b/t/t5323-pack-redundant.sh @@ -36,6 +36,12 @@ relationship between packs and objects is as follows: . ./test-lib.sh +if ! test_have_prereq WITHOUT_BREAKING_CHANGES +then + skip_all='skipping git-pack-redundant tests; built with breaking changes' + test_done +fi + main_repo=main.git shared_repo=shared.git From patchwork Mon Jan 6 07:51:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13927004 Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.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 D96181D7984 for ; Mon, 6 Jan 2025 07:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149907; cv=none; b=u4YrYxRa4v2GksG58d+WvVMdF9tJ1W0nwa9RtjQW6lCaYzC9dfVkwVUo+/SNgCX5wvanLFy2zEr04LnRgyqgjFOYy32oOu6vD2fMcN0ZEDbfb2abc0kcHOrOXQdHc2zCPjm8/rTFeu3K1KijCOjPOLoVTt+eGmgUgpZHk26YJwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736149907; c=relaxed/simple; bh=F94XyCJ7XMCjSUkh7JjvxEZw2N+2TYqDfXSbOe2XtQk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T4JjmHNj+w/eK/l18RhPpX18xWRrfKtU7zNI+FGlRWIYZ7INYkLsqVfP55Gz/rK0NSm4oPCKfdPU1WVHcUp3lXmWmTzgiVEISKDW+YxbreqYgn1zI+CIuwc4oYLieJU9FF7gnBY8VWlbSSZYuOPO9DMgxpEkkn903D1DVqwzW9E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Mbhx6/3f; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=beMiOdeW; arc=none smtp.client-ip=103.168.172.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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="Mbhx6/3f"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="beMiOdeW" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id F06AC1380927; Mon, 6 Jan 2025 02:51:43 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Mon, 06 Jan 2025 02:51:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding: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=1736149903; x=1736236303; bh=MgEuIRniV1tAj4AlpIomrnK2+ZJRGUrSTP+4e/IOD0k=; b= Mbhx6/3fNXh1s+StWfUP7sTZ5VpHyrItNVlNUujRSCIFnI1Tds/f/7CTjGDN28ve mdq7U9q86EWGCUtyjRfU2POw4ceA8asnFtwRWBWwGfgikc3qT2DemmTle1rLGM/m 0wXRY7IEcKNYNkKsOBPwhPN9uoxyWVv4Lf0v2KAdaynBIRWwQWiFzfgUo4VAXoW1 YO3JjoJBJSyDJN6hY+RlrCdkIvkmoScgmuISFO4N/1Sa0q9bA82h2+5/vdmTrE+9 zXzuVvZg9b7hofjjcGfuV9udQmQKSdelWv4YItGZuQnsO0wievH7NjxMugLu+tWB RxiHdz4W/cX6hs8yvONGlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1736149903; x= 1736236303; bh=MgEuIRniV1tAj4AlpIomrnK2+ZJRGUrSTP+4e/IOD0k=; b=b eMiOdeWpooKMbpGz0VA4ZosROxMvSZwW+NPWgNnRbcskcUMUhTWgVXppD8ZCbV6D VrNq8LqHYVhllH6AhJGmFu07WEwrxwBN9QyqS2iH2nlPPIV7LABggHOmF6z/Iybi iUB7RtGme9wMQOm+PvK+w9MtXC2yP9wb8z6+nH3BKKa93RXV/KpNnWzPGr2UPE3P iJLAiOk00ZaDKjepp0/4RWzTAVeeQ27/xVMGXVh73rIpyrFBJFcBwqf1fdg9EH93 Z6h42UyAxntjrUquLtfDmqdztSNRNfwkBrLAPn2LTu50hHdEVgE8jKsAypd80NPK VCdpIdanA/MGE5ijGiXjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefledgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtoh hmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 02:51:43 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 1dfe61e1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 6 Jan 2025 07:51:42 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 06 Jan 2025 08:51:37 +0100 Subject: [PATCH v2 5/5] remote: announce removal of "branches/" and "remotes/" Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250106-pks-remote-branches-deprecation-v2-5-2ce87c053536@pks.im> References: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> In-Reply-To: <20250106-pks-remote-branches-deprecation-v2-0-2ce87c053536@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" X-Mailer: b4 0.14.2 Back when Git was in its infancy, remotes were configured via separate files in "branches/" (back in 2005). This mechanism was replaced later that year with the "remotes/" directory. These mechanism have eventually been replaced by config-based remotes, and it is very unlikely that anybody still uses these directories to configure their remotes. Both of these directories have been marked as deprecated, one in 2005 and the other one in 2011. Follow through with the deprecation and finally announce the removal of these features in Git 3.0. Signed-off-by: Patrick Steinhardt --- Documentation/BreakingChanges.txt | 25 ++++++++++++++++++ Documentation/gitrepository-layout.txt | 7 +++-- builtin/remote.c | 2 ++ remote.c | 6 +++++ remote.h | 2 ++ t/t5505-remote.sh | 6 ++--- t/t5510-fetch.sh | 13 ++++------ t/t5515-fetch-merge-logic.sh | 47 ++++++++++++++++++---------------- t/t5516-fetch-push.sh | 14 +++++----- 9 files changed, 79 insertions(+), 43 deletions(-) diff --git a/Documentation/BreakingChanges.txt b/Documentation/BreakingChanges.txt index 27acff86db4883a7d7967343c61711959b75a473..a91eb3bc5518d09b39c49ce07964ca3aba7b11dd 100644 --- a/Documentation/BreakingChanges.txt +++ b/Documentation/BreakingChanges.txt @@ -154,6 +154,31 @@ Cf. , , <20230323204047.GA9290@coredump.intra.peff.net>, +* Support for storing shorthands for remote URLs in "$GIT_COMMON_DIR/branches/" + and "$GIT_COMMON_DIR/remotes/" has been long superseded by storing remotes in + the repository configuration. ++ +The mechanism has originally been introduced in f170e4b39d ([PATCH] fetch/pull: +short-hand notation for remote repositories., 2005-07-16) and was superseded by +6687f8fea2 ([PATCH] Use .git/remote/origin, not .git/branches/origin., +2005-08-20), where we switched from ".git/branches/" to ".git/remotes/". That +commit already mentions an upcoming deprecation of the ".git/branches/" +directory, and starting with a1d4aa7424 (Add repository-layout document., +2005-09-01) we have also marked this layout as deprecated. Eventually we also +started to migrate away from ".git/remotes/" in favor of config-based remotes, +and we have marked the directory as legacy in 3d3d282146 (Documentation: +Grammar correction, wording fixes and cleanup, 2011-08-23) ++ +As our documentation mentions, these directories are not to be found in modern +repositories at all and most users aren't even aware of these mechanisms. They +have been deprecated for almost 20 years and 14 years respectively, and we are +not aware of any reason why anybody would want to use these mechanisms. +Furthermore, the ".git/branches/" directory is nowadays misleadingly named and +may cause confusion as "branches" are almost exclusively used in the context of +references. ++ +These features will be removed. + == Superseded features that will not be deprecated Some features have gained newer replacements that aim to improve the design in diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt index fa8b51daf08775f3d666a910d9b00486627e02af..85911ca8ea0b222ab9cc3dc2dd99c5136c72bd2b 100644 --- a/Documentation/gitrepository-layout.txt +++ b/Documentation/gitrepository-layout.txt @@ -153,7 +153,7 @@ config.worktree:: linkgit:git-worktree[1]). branches:: - A slightly deprecated way to store shorthands to be used + A deprecated way to store shorthands to be used to specify a URL to 'git fetch', 'git pull' and 'git push'. A file can be stored as `branches/` and then 'name' can be given to these commands in place of @@ -162,7 +162,8 @@ branches:: and not likely to be found in modern repositories. This directory is ignored if $GIT_COMMON_DIR is set and "$GIT_COMMON_DIR/branches" will be used instead. - ++ +Git will stop reading remotes from this directory in Git 3.0. hooks:: Hooks are customization scripts used by various Git @@ -238,6 +239,8 @@ remotes:: and not likely to be found in modern repositories. This directory is ignored if $GIT_COMMON_DIR is set and "$GIT_COMMON_DIR/remotes" will be used instead. ++ +Git will stop reading remotes from this directory in Git 3.0. logs:: Records of changes made to refs are stored in this directory. diff --git a/builtin/remote.c b/builtin/remote.c index 1ad3e70a6b438a3c4446b16c02dc5c23c7fa14be..e565b2b3fec8bf2e4182e85d8d08953a14416881 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -640,10 +640,12 @@ static int migrate_file(struct remote *remote) strbuf_addf(&buf, "remote.%s.fetch", remote->name); for (i = 0; i < remote->fetch.nr; i++) git_config_set_multivar(buf.buf, remote->fetch.items[i].raw, "^$", 0); +#ifndef WITH_BREAKING_CHANGES if (remote->origin == REMOTE_REMOTES) unlink_or_warn(git_path("remotes/%s", remote->name)); else if (remote->origin == REMOTE_BRANCHES) unlink_or_warn(git_path("branches/%s", remote->name)); +#endif /* WITH_BREAKING_CHANGES */ strbuf_release(&buf); return 0; diff --git a/remote.c b/remote.c index 10104d11e3cba1908cd35f22b54e167755770404..55e91fab47197313fd8c2c1c5f73fcd46b4df4f7 100644 --- a/remote.c +++ b/remote.c @@ -293,6 +293,7 @@ static void add_instead_of(struct rewrite *rewrite, const char *instead_of) rewrite->instead_of_nr++; } +#ifndef WITH_BREAKING_CHANGES static const char *skip_spaces(const char *s) { while (isspace(*s)) @@ -374,6 +375,7 @@ static void read_branches_file(struct remote_state *remote_state, strbuf_release(&buf); free(to_free); } +#endif /* WITH_BREAKING_CHANGES */ static int handle_config(const char *key, const char *value, const struct config_context *ctx, void *cb) @@ -572,6 +574,7 @@ static void read_config(struct repository *repo, int early) alias_all_urls(repo->remote_state); } +#ifndef WITH_BREAKING_CHANGES static int valid_remote_nick(const char *name) { if (!name[0] || is_dot_or_dotdot(name)) @@ -583,6 +586,7 @@ static int valid_remote_nick(const char *name) return 0; return 1; } +#endif /* WITH_BREAKING_CHANGES */ static const char *remotes_remote_for_branch(struct remote_state *remote_state, struct branch *branch, @@ -725,12 +729,14 @@ remotes_remote_get_1(struct remote_state *remote_state, const char *name, &name_given); ret = make_remote(remote_state, name, 0); +#ifndef WITH_BREAKING_CHANGES if (valid_remote_nick(name) && have_git_dir()) { if (!valid_remote(ret)) read_remotes_file(remote_state, ret); if (!valid_remote(ret)) read_branches_file(remote_state, ret); } +#endif /* WITH_BREAKING_CHANGES */ if (name_given && !valid_remote(ret)) add_url_alias(remote_state, ret, name); if (!valid_remote(ret)) diff --git a/remote.h b/remote.h index a7e5c4e07c53ce5a0f6d852ce9f9233e6bb61550..45b0c9babb1374a05471e86de2c248972adb2aae 100644 --- a/remote.h +++ b/remote.h @@ -21,8 +21,10 @@ struct transport_ls_refs_options; enum { REMOTE_UNCONFIGURED = 0, REMOTE_CONFIG, +#ifndef WITH_BREAKING_CHANGES REMOTE_REMOTES, REMOTE_BRANCHES +#endif /* WITH_BREAKING_CHANGES */ }; struct rewrite { diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 08424e878e104cc19a43960b987cf868f542cad2..e96ac8c7676ceeb7299c8f0839d9654d527ae084 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -1007,7 +1007,7 @@ Pull: refs/heads/main:refs/heads/origin Pull: refs/heads/next:refs/heads/origin2 EOF -test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/remotes' ' git clone one five && origin_url=$(pwd)/one && ( @@ -1033,7 +1033,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' ' ) ' -test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches' ' git clone --template= one six && origin_url=$(pwd)/one && ( @@ -1049,7 +1049,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' ' ) ' -test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'migrate a remote from named file in $GIT_DIR/branches (2)' ' git clone --template= one seven && ( cd seven && diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 3b3991ab8678a57fce3ad371e37900fb3c6c426a..04d8a96367910d4687b18a8f725dc365cf2ceedb 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -34,14 +34,11 @@ test_expect_success "clone and setup child repos" ' git clone . three && ( cd three && - git config branch.main.remote two && - git config branch.main.merge refs/heads/one && - mkdir -p .git/remotes && - cat >.git/remotes/two <<-\EOF - URL: ../two/.git/ - Pull: refs/heads/main:refs/heads/two - Pull: refs/heads/one:refs/heads/one - EOF + git config set remote.two.url ../two/.git/ && + git config set remote.two.fetch refs/heads/main:refs/heads/two && + git config set --append remote.two.fetch refs/heads/one:refs/heads/one && + git config set branch.main.remote two && + git config set branch.main.merge refs/heads/one ) && git clone . bundle && git clone . seven diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 320d26796d24d8a2281d37220a7bdf73cafaa503..4e6026c6114fb8367136173ea2b7fdbc0baa37fc 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -104,28 +104,31 @@ test_expect_success setup ' git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* && remotes="$remotes config-glob" && - mkdir -p .git/remotes && - cat >.git/remotes/remote-explicit <<-\EOF && - URL: ../.git/ - Pull: refs/heads/main:remotes/rem/main - Pull: refs/heads/one:remotes/rem/one - Pull: two:remotes/rem/two - Pull: refs/heads/three:remotes/rem/three - EOF - remotes="$remotes remote-explicit" && - - cat >.git/remotes/remote-glob <<-\EOF && - URL: ../.git/ - Pull: refs/heads/*:refs/remotes/rem/* - EOF - remotes="$remotes remote-glob" && - - mkdir -p .git/branches && - echo "../.git" > .git/branches/branches-default && - remotes="$remotes branches-default" && - - echo "../.git#one" > .git/branches/branches-one && - remotes="$remotes branches-one" && + if test_have_prereq WITHOUT_BREAKING_CHANGES + then + mkdir -p .git/remotes && + cat >.git/remotes/remote-explicit <<-\EOF && + URL: ../.git/ + Pull: refs/heads/main:remotes/rem/main + Pull: refs/heads/one:remotes/rem/one + Pull: two:remotes/rem/two + Pull: refs/heads/three:remotes/rem/three + EOF + remotes="$remotes remote-explicit" && + + cat >.git/remotes/remote-glob <<-\EOF && + URL: ../.git/ + Pull: refs/heads/*:refs/remotes/rem/* + EOF + remotes="$remotes remote-glob" && + + mkdir -p .git/branches && + echo "../.git" > .git/branches/branches-default && + remotes="$remotes branches-default" && + + echo "../.git#one" > .git/branches/branches-one && + remotes="$remotes branches-one" + fi && for remote in $remotes ; do git config branch.br-$remote.remote $remote && diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 9d693eb57f7790ddb81cee0b905a101719069562..e705aedbf4a8d57ed188918077b9f82ed8e77b51 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 'fetch with branches' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'fetch with branches' ' mk_empty testrepo && git branch second $the_first_commit && git checkout second && @@ -991,7 +991,7 @@ test_expect_success 'fetch with branches' ' git checkout main ' -test_expect_success 'fetch with branches containing #' ' +test_expect_success WITHOUT_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 'fetch with branches containing #' ' git checkout main ' -test_expect_success 'push with branches' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches' ' mk_empty testrepo && git checkout second && @@ -1022,7 +1022,7 @@ test_expect_success 'push with branches' ' ) ' -test_expect_success 'push with branches containing #' ' +test_expect_success WITHOUT_BREAKING_CHANGES 'push with branches containing #' ' mk_empty testrepo && test_when_finished "rm -rf .git/branches" && @@ -1211,18 +1211,16 @@ test_expect_success 'push --porcelain --dry-run rejected' ' ' test_expect_success 'push --prune' ' - mk_test testrepo heads/main heads/second heads/foo heads/bar && + mk_test testrepo heads/main heads/foo heads/bar && git push --prune testrepo : && check_push_result testrepo $the_commit heads/main && - check_push_result testrepo $the_first_commit heads/second && ! check_push_result testrepo $the_first_commit heads/foo heads/bar ' test_expect_success 'push --prune refspec' ' - mk_test testrepo tmp/main tmp/second tmp/foo tmp/bar && + mk_test testrepo tmp/main tmp/foo tmp/bar && git push --prune testrepo "refs/heads/*:refs/tmp/*" && check_push_result testrepo $the_commit tmp/main && - check_push_result testrepo $the_first_commit tmp/second && ! check_push_result testrepo $the_first_commit tmp/foo tmp/bar '