From patchwork Wed Jan 22 11:31:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13947154 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 9CDBE156F2B for ; Wed, 22 Jan 2025 11:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545499; cv=none; b=Wypm5WKzaiXI9wpJNvpF0+Gco78DtF+viVZgBP6iiRZyCgNpu6WHCBh7+utzpjnxhXIvvw7mZsASmt1t/8xp9QtYpCbLmR0xMBwXDBuDtkUyyeRLAR6N0eDim7jirXbgTmrXQuWJX3XVxecT92L7XY/cAgRwYTJ5kGtxOBP7QEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545499; c=relaxed/simple; bh=D/kLwR3I0FOH0MmJpKK+21io7hwpNSQp9HEenhAtft4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ACDkbCKwNzAMYg+OZsa8sA1qC2ucOQk3bjDVQNmogau+otGcR+434U6JMVN7q7QOzyOu5SPzF0BQvYLNpZ3l3FXvObJrioudkpaA5XnrBNIJXNNYbMJ86ADbtih+xaKq+u3iSTpZjhk5kvH2JLYiPbz5DjWwrUlUzDDS/9QmkHY= 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=LIM0ISn9; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=YLsxGkvW; arc=none smtp.client-ip=202.12.124.149 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="LIM0ISn9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YLsxGkvW" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 825E8114011C; Wed, 22 Jan 2025 06:31:36 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 22 Jan 2025 06:31:36 -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=fm3; t=1737545496; x=1737631896; bh=AMNy1+3ZP7nwdA5WQT6Lgny1HpgGhfLUH7AOYszCjHM=; b= LIM0ISn9WenkYbp/dW/QwWb8RA1mVmCjYXrqXcCEbDW0Yu+mAbuv1N8yNVfoFwmI 9iUB4W2eqIlIzQupsZXN+O+wOVakDvx3t2qXipz1dtIb9kZ2//A9RRF58Ts8Pclg HWMP7siXaAFzY5KgB1/bTiMahfv1wSbmJ8YyB+dqIC9+1ajkYjvjMXxW0AL7XJtD gD/nnZgu2L/abyT94CGx0J9BSQHy31qn46NekvGzYJEiJpgW1Xdywy345yPaG1qv KewjS1cQuTp3OQ2e9/EGMDcXYVO/T9rSj4yjgKozJjVg3A1bjecia/FtOiKiEiHR JfK2KJK7qCG6IZzoucOZVA== 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=fm3; t=1737545496; x= 1737631896; bh=AMNy1+3ZP7nwdA5WQT6Lgny1HpgGhfLUH7AOYszCjHM=; b=Y LsxGkvWbNKDAzOA9ft8BZ1fE9+ah5yqhH7Dbp04NuPHxyldkiGeRh6v1qnf1neyB lV7GrpsvxB1dH3uiwfkZTDmEk37rOo/FvP8dmhTYM/yMVuxEwdeEKvQgPcfjGfxP H9IJa4yAM0ub4qyQJtcrS0ZWajPHzwJv0uhZGGhONRfPfW7wknroyDIqbfW3f3Uj sN3p42yIFOM+Uxh01FWliZh6fx88VQgf/4eGpYHKAUnZ+kYCC7kqAeU6hw0Cq1a/ 2zbngc/haNPkkqBt0g0IL5QBvmcz+P9NYOUEhodyeZS7MrM9/50eDEtOQ2EfYjsa oXzFAk61RVhYbQ3MPsadg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejfedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheprhgrnhgurghllhdrsggvtghkvghrsehnvgigsg hrihgughgvrdgtrgdprhgtphhtthhopegthhhrihhstghoohhlsehtuhigfhgrmhhilhih rdhorhhgpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtph htthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomhdprhgtphhtthhopehrohgs vghrthdrtghouhhpsehkohhorhguihhnrghtvghsrdgtohhmpdhrtghpthhtohepghhith hsthgvrhesphhosghogidrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jan 2025 06:31:35 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 4a23c53d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Jan 2025 11:31:32 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 22 Jan 2025 12:31:29 +0100 Subject: [PATCH v4 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: <20250122-pks-remote-branches-deprecation-v4-1-5cbf5b28afd5@pks.im> References: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> In-Reply-To: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" , Junio C Hamano , Robert Coup , Christian Couder , "Randall S. Becker" 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. This does not yet wire up the build flag for existing deprecations. 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 f651116102..f1d0ecf123 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 06f01149ec..dc3c980aa7 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 49904ca8a9..63d0088928 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 0dccebcdf1..316cd93264 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 32a72139ba..800e518d95 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 62dfcc4aaf..6e423f655d 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 Wed Jan 22 11:31:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13947155 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (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 BDF7C20FA9A for ; Wed, 22 Jan 2025 11:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.149 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545500; cv=none; b=u3/e9LIMrjmZ42Tw89ujeZvVgAbeanNdQTcdLaw744CPqIFZFGg+18KJn5C+Gh67pw27jxf6YRYbI8XYkG2ARmiBXO/HWQXK9eWfN8J5ioHTFtjX6ndImo816QSEsx4DCWzO/XaX7FqG1Ct1JkU0wCqYyx/wC/gWhAwxqPTPRrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545500; c=relaxed/simple; bh=MBFnCrBoVuW11QfJkrrVYSbDrGut5xQzgTGFzP3SQVM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OUm22jE1CoLqGXLYSs3R8EmDO1HBfvgSuJbI7LhrNIQH02oZqSjGw4FyhifKc2FqvlP52ce9HMe6q9Q/M9JQU5uk9F12BGO+TwoQTWiZg/6NDKhjVNiYyzy2QX0zJddTAf6A3q3LkSNQwJ+l1TLEm74wZL8YWPMLHXy5G/uZCf0= 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=MjdMwa8w; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=UB+z27lJ; arc=none smtp.client-ip=202.12.124.149 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="MjdMwa8w"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="UB+z27lJ" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id B7E581140123; Wed, 22 Jan 2025 06:31:37 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Wed, 22 Jan 2025 06:31:37 -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=fm3; t=1737545497; x=1737631897; bh=OsJaIhL/66BSCaKwX49vP8QcAwbh/nyoVjlbcifKxEU=; b= MjdMwa8wcVr91THw1qqKNj8lTb2wv5Zth9sxlJYvlu66dYPYGCJ8hceI6DDAHMfn OJs5BvmAGVGRu5e9FgI1Ozws6wilOiQ5SCwdYI5EJIA0I79+U87xRwTUiZx4XVrp DkGu35ryYh6Eb06vj4wcZ/EfEj09i21pWmsThllh1ngGse0oekEKFQryHWLS1NtZ 2GPPmJHxwL8Ka/USUdkkBEl1kQuytrXRI/wy46nUWYrwzCJ+8KpeZD2eymbEmB8L Dpa5jPRUmXSVnQ4/mY+iSb8Gi/SxnWxNvbjRufyKASDFQN3FEQfzxVKwFdtZHagZ qfAmYepGKzNPKLyNIk0Fsw== 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=fm3; t=1737545497; x= 1737631897; bh=OsJaIhL/66BSCaKwX49vP8QcAwbh/nyoVjlbcifKxEU=; b=U B+z27lJOJh6jHHtqyvjU2IxYjg6rJd34OMOmsH0ukZVMvdKD1MZpPoBysYeV1fPt WIm5lCkls/1xAYSPtXNV3nYZ6fSBrWZjY4GjBmMARJL6Ol6GghARgFp4dLSvFtQ2 kc8cOBLJupC1owyK4sBDmRax5q4+zcE423gNI2RVaQY7uD9DYM2TkDad0xg20fPv bDO0VvNGiLp2wUxQ5jCHWpGoJKnIpz/XtW7vtJ7t0UFbN5H3/9urdx7W+v3F/VWy 12PJPr86ttI+6PQX4ppADCxgTkjJnpMELF2ODCgmBpF2fQ7DN/rVtXHKTCjtHh6c dqHErX8gJDB87fenNtpTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejfedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheprhgrnhgurghllhdrsggvtghkvghrsehnvgigsg hrihgughgvrdgtrgdprhgtphhtthhopegthhhrihhstghoohhlsehtuhigfhgrmhhilhih rdhorhhgpdhrtghpthhtohepsggvnhdrkhhnohgslhgvsehgmhgrihhlrdgtohhmpdhrtg hpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrohgs vghrthdrtghouhhpsehkohhorhguihhnrghtvghsrdgtohhmpdhrtghpthhtohepghhith hsthgvrhesphhosghogidrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jan 2025 06:31:36 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 2a6bff9c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Jan 2025 11:31:33 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 22 Jan 2025 12:31:30 +0100 Subject: [PATCH v4 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: <20250122-pks-remote-branches-deprecation-v4-2-5cbf5b28afd5@pks.im> References: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> In-Reply-To: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" , Junio C Hamano , Robert Coup , Christian Couder , "Randall S. Becker" 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". - We use "ubuntu:20.04" in one job and "ubuntu:latest" in another. We already have a couple other jobs testing these respectively. So overall, the job does not add much to our test coverage. Drop the "linux-gcc-default" job and adapt "linux-gcc" to start using the default GCC compiler, effectively merging those two jobs into one. 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 808ddc19b8..32d35d2257 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 a1bc92893f..b86bb0bdb3 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 930f98d722..e67c481d4f 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 Wed Jan 22 11:31:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13947156 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 95AE12101AD for ; Wed, 22 Jan 2025 11:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545501; cv=none; b=IGzA6JhpasJhxEpztDvOVNccKo+6IIcfDhy1aZ3AakaA8DZ65LknhrHQrUWkQXod52wln4kII/s4xFngIgYrCMRlzp8WeaCoj/cA//kzrGc2whv49etPm0KxnGa7Yz7PR8G0np5QUNvrr35Nchdf2Lw64hn85cM7cw1SeDjkxQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545501; c=relaxed/simple; bh=eDGUWrzUe8GZvCOv+LT8mgT9RVg//XXEcW7QZ0BcNp4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kF7fmA6xealPcHafBjh2+Gvc0LmQHLbNTd8Ujn4cr7ofEQhUa1zE30aDMv9s8sJy+F4z5FAhpH5Av4nfVEDknaVI7Cl0cSVWjNJPeOcvHjFdBaMLebD8+kSbk8o1zv0hNWEOcW4rCDsNUgL5/Pmvl4cJnD2OdxMnxS+lKbxYenc= 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=SpPkVoXu; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jGIfzGrf; arc=none smtp.client-ip=202.12.124.157 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="SpPkVoXu"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jGIfzGrf" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 612FA25400EC; Wed, 22 Jan 2025 06:31:38 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 22 Jan 2025 06:31:38 -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=fm3; t=1737545498; x=1737631898; bh=H4NuwFvOGWLy97Jv8QTYNEHPW9H1UZ3+tkw+2VYdQJ4=; b= SpPkVoXulrs+fDmU+qLd1q68ScdE6N712pSC15RjsW5s2eX0Q2TTPfcBYaNRaxgY VCIM2IY2l535mAJTRHJ2n2ZDWzkkNRhLJ3TRgCFmG+QflUNMvD+DEMvBz4rOzKe/ 2NTQ5Dtt7pm7bWrsNuZptrcXCAumzRVMzznXSbJGreJ/Bb8AnFreTeWUnRfZ1NVK jrDWifKc3xfj6yMr18uLcDIzCz53WzvnchNmjR0WTNe9nbSOw8Xrw+1VAxdDYBE8 sJbcrdJyb9pXzkLno1rvr2tBqaBQd2OzSkADmVH5YoA0aAmAk6QSETiYAwgNVL0i 4O+9kzI3lcGSlUSYEsEK5g== 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=fm3; t=1737545498; x= 1737631898; bh=H4NuwFvOGWLy97Jv8QTYNEHPW9H1UZ3+tkw+2VYdQJ4=; b=j GIfzGrfZX6deSb7jYx/svF/0vE/LeOIgG2lp+uFbiB7h3XB4OBY5c4kbFLRnu1/0 RrW8NDoNtdWZFk1Bun/H+Wnn2URnUXPzQyekxZucI9X/s2zDXOXe+vqv65dAKJmv 3iaagjLkKSOhCfXJbNUZ9M1PYC7LyMWP9pykWIjOU+TO5yD4aad0v/FcU1CUgY8Q XgX2CF9aZtFlTQMxOIvXflFAmhB9hmyj+ieNC+8Gqg78W34YMDYy2TnfVbsLKKNF PtInSSeNrr2aukHnrMFBQgBamqnxJ1d2gDZGxrXphi5FRjHvU0dCQe0HrY+Baicx 3gSI0NDG1vc+WBdcVNaoA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejfedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheptghhrhhishgtohholhesthhugihfrghmihhlhi drohhrghdprhgtphhtthhopehrohgsvghrthdrtghouhhpsehkohhorhguihhnrghtvghs rdgtohhmpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprhgtphhtth hopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhgrnhgurghl lhdrsggvtghkvghrsehnvgigsghrihgughgvrdgtrgdprhgtphhtthhopegsvghnrdhknh hosghlvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jan 2025 06:31:36 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 895b4374 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Jan 2025 11:31:34 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 22 Jan 2025 12:31:31 +0100 Subject: [PATCH v4 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: <20250122-pks-remote-branches-deprecation-v4-3-5cbf5b28afd5@pks.im> References: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> In-Reply-To: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" , Junio C Hamano , Robert Coup , Christian Couder , "Randall S. Becker" 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 32d35d2257..46b96fb96c 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 b86bb0bdb3..492e5d9082 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 2e28d02b20..2ccd812fb4 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 Wed Jan 22 11:31:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13947157 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 95A7420FAAB for ; Wed, 22 Jan 2025 11:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545501; cv=none; b=jdfMGRv6ghhE8VR/Yi2dCUu1K9gd1wYLxR033F1n6JI4iSG93mngbpywkCIcGJbpoVuyOOr1X7/6kO3CcAXSsk61a8RNsxXMa8kQ0TyUFRaltoymZRX45xPqfFDxyt5Y6aKTVVrLWmXOUD2rNJdhh6v38T/ZSK9BG0+hWTxw2x0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545501; c=relaxed/simple; bh=rzTeWvGl4h9Qku+ZNea5uGN9IVHtX82P5Jlfd1wxjkU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PcAU+N/8q0O3we2KxeLSAcx1zTZswB1aJbUCRhD1gk05bd6SmFkbZMFKOGteKbHN2xcL3lFUBIzsFofl41sCnqXjVdpm8jFIH/L4pS3nIftg0RBGCBdddyE3CgGM/EGQFmSz7C752QAkxbbfS2ZHMP4V6f5/iMyWkHuPGDmpscY= 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=TBTG5WfF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jS+o8EzW; arc=none smtp.client-ip=202.12.124.157 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="TBTG5WfF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jS+o8EzW" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 9A7D52540137; Wed, 22 Jan 2025 06:31:38 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 22 Jan 2025 06:31:38 -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=fm3; t=1737545498; x=1737631898; bh=GOJQmiAOwCOERunYnHREnCebAHa/voaXtA7jmRVbAfo=; b= TBTG5WfFNUAtWiVnwk20qHhzQJgwCN2i1hugT7hsZlaWOzhO8zmEKDGKINF6PDqp 8CHIFC43JTu3/aKDY8BsPHHZ0V6RHE+AkiEV9qac+cUtpLBTzWBvF8o1ZLL9HuBg 0N8BTTCMPLnrTbo8h7d9VFhhVDHVvJZ2JYefm/M7kq4Gge8PzsZkFUf94c4fAqWl UX+r1DwjaUWTs1qTyV7bwscOUXlJpAkC6vjdzgeKIbqhf7+IeDr3HGr/arltzxaB DD+vV0iEMUV2dYyjeEPev1oee8xKfHra0nQ38YDlYbuOniOtCjlJH0sraYX2ZSGT LAvrIUZ/a/xZ8jfZGJH8Vg== 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=fm3; t=1737545498; x= 1737631898; bh=GOJQmiAOwCOERunYnHREnCebAHa/voaXtA7jmRVbAfo=; b=j S+o8EzWMO5S9DZbwz8fDPRMjEhRosPKJ0g522BAMK0pA8uMhVpiqReUpvePnlk0q LlfGYZLiqGVZWQSJ+LyCBGK/3B8CFzeQ5V7xuW1Ayb/ZjjUV/mXbk/WBjr3UqaeE HCc+Co2useYiaADJcwmYwMmmrJrVkXvcHt65UkMapA5NoKrbtrK1JSMWGuvV52Ea KG+NQLLUc1Os8332T7+qJ5irDEcMnA6t3qcwRn0ZG9Jqv0f+EdZYaasN+CYwnoyp TZQdwQ413Q/kvXlAZ5CWpEsre309hpq4IiytbLkM0FVe/SZhAvRcvZd9gcvZ3LNP B7pO+F9BxjD8vzviRsghQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejfedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheprhgrnhgurghllhdrsggvtghkvghrsehnvgigsg hrihgughgvrdgtrgdprhgtphhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhmpdhr tghpthhtoheprhhosggvrhhtrdgtohhupheskhhoohhrughinhgrthgvshdrtghomhdprh gtphhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtghomhdprhgtphhtthhopegt hhhrihhstghoohhlsehtuhigfhgrmhhilhihrdhorhhgpdhrtghpthhtohepghhithesvh hgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jan 2025 06:31:36 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 064c7e9f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Jan 2025 11:31:35 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 22 Jan 2025 12:31:32 +0100 Subject: [PATCH v4 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: <20250122-pks-remote-branches-deprecation-v4-4-5cbf5b28afd5@pks.im> References: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> In-Reply-To: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" , Junio C Hamano , Robert Coup , Christian Couder , "Randall S. Becker" 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 dc3c980aa7..e6b0d85980 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 46b3c740c5..a13c32bcdc 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 8dbbcc5e51..688cd9706c 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 Wed Jan 22 11:31: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: 13947158 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 A92F1211A27 for ; Wed, 22 Jan 2025 11:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545502; cv=none; b=Quz1ADeeVXegO2Wv56RhwiedAJO6PaiLR6VNwGzuZBIItDBN12QPncMNcN3K/2DJW7tUoy7MZ3f5x1+N9BMKmZtX1yeVHLLvhoNSlT55IvbfJ64/rNKRtnWHyRgTisnnQgcDJzl1eBRwCoQ4gA+VGrQ5lGQkM1xKtRL5g6/xDHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737545502; c=relaxed/simple; bh=VnYLdVtYL8RLYYbgjo+E5f3fqLnUBJqIHoIsPwHu2AM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eIflW/BhWGFWqNBasRJyH2FEGBjMZTr3F1NMU6WWdKvarltghU+je1RRntvP4YzdN1RE5NS4WMl6PSuK3+4O00duBes21CQPl2YM4f/TyWAjwCu1nrH+bvz9B3ugRzMv7eQ6ltPVgacaXALUCxavEcbV1AsI9cu4tts/8ECstyg= 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=EyUGhRIT; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GXIJQkja; arc=none smtp.client-ip=202.12.124.157 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="EyUGhRIT"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GXIJQkja" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id AD3E42540140; Wed, 22 Jan 2025 06:31:39 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 22 Jan 2025 06:31:39 -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=fm3; t=1737545499; x=1737631899; bh=6YJGkpQKHvHagOehyOyRSIgDEZJa1mfEzo8H9lZmzd4=; b= EyUGhRIThJ/CJP9RowopLP96VEwhfJnbeOSXOX9vur3AK6EcE6XPCot7PrLU9fC+ s7241oxsEplsTtBa0Q4ZB7iVRZ150TyO8jZskrw+Hk4An0n1guT/jwBqIVH5R7Tw NNjp09ryw3e5W5mztpb+dgcCid9yvLkSKIY0alepFq35x+0dyhhxaAUg1HUrib7w nEx1lykUo/aRfB6J50taTpbnkdKHKuDHDsjmcZPhLlQ/C2mj8fU4r8wSIIiNNxVQ LhHeTc+1mh/V/owNoStZpLyPA7gBuJVYVH8NYv3Nb6JmO30MY1fSgo+Zrbhyb7cl lwgJ89qWgAAfSCTrd41glA== 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=fm3; t=1737545499; x= 1737631899; bh=6YJGkpQKHvHagOehyOyRSIgDEZJa1mfEzo8H9lZmzd4=; b=G XIJQkja6w30ObLHWZYk8bYjQICtCYrWmW4zdt8ZxX6NVG42m1bfueI4BUyyDiPxu w7g86PxDY5EVeb6819ve+WCVRDaNfE4aLutY5jvtOH8PJR1MfmKJD5F+FUjJVSsZ RppgC9J2II32fXeMgbbrTKOogvvHk0OnsuOj4pcMJ9LBPdgNrCC8bC1yj01hXWhz V5tagLDnkjKQtuycIyQXp3utD0oGDibBF+tEFW1FP0bDD+bbhwHu25AtGtCugvGN 1l1NbuJDs7pET1jURqXHAulAXVc9QBrfuGO++O7Awn2L+RYUII7ZXWKPegyFnFr0 xVY9umsSs0uyVN+QvZHJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejfedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepiedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtoheprhhosggvrhhtrdgtohhupheskhhoohhrughinh grthgvshdrtghomhdprhgtphhtthhopegsvghnrdhknhhosghlvgesghhmrghilhdrtgho mhdprhgtphhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhmpdhrtghpthhtohepgh hithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrrghnuggrlhhlrdgs vggtkhgvrhesnhgvgigsrhhiughgvgdrtggrpdhrtghpthhtoheptghhrhhishgtohholh esthhugihfrghmihhlhidrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jan 2025 06:31:38 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id b26ebc31 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 22 Jan 2025 11:31:36 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 22 Jan 2025 12:31:33 +0100 Subject: [PATCH v4 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: <20250122-pks-remote-branches-deprecation-v4-5-5cbf5b28afd5@pks.im> References: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> In-Reply-To: <20250122-pks-remote-branches-deprecation-v4-0-5cbf5b28afd5@pks.im> To: git@vger.kernel.org Cc: "D. Ben Knoble" , Junio C Hamano , Robert Coup , Christian Couder , "Randall S. Becker" 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. Both mechanisms 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 | 26 +++++++++++++++++++ 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, 99 insertions(+), 43 deletions(-) diff --git a/Documentation/BreakingChanges.txt b/Documentation/BreakingChanges.txt index 27acff86db..7c388e56c8 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 active users that have complained about this deprecation. +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 fa8b51daf0..85911ca8ea 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 1ad3e70a6b..e565b2b3fe 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 10104d11e3..ec69863f11 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)) @@ -300,6 +301,21 @@ static const char *skip_spaces(const char *s) return s; } +static void warn_about_deprecated_remote_type(const char *type, + const struct remote *remote) +{ + warning(_("reading remote from \"%s/%s\", which is nominated for removal.\n" + "\n" + "If you still use the \"remotes/\" directory it is recommended to\n" + "migrate to config-based remotes:\n" + "\n" + "\tgit remote rename %s %s\n" + "\n" + "If you cannot, please let us know you still use it by sending an\n" + "e-mail to ."), + type, remote->name, remote->name, remote->name); +} + static void read_remotes_file(struct remote_state *remote_state, struct remote *remote) { @@ -308,6 +324,9 @@ static void read_remotes_file(struct remote_state *remote_state, if (!f) return; + + warn_about_deprecated_remote_type("remotes", remote); + remote->configured_in_repo = 1; remote->origin = REMOTE_REMOTES; while (strbuf_getline(&buf, f) != EOF) { @@ -337,6 +356,8 @@ static void read_branches_file(struct remote_state *remote_state, if (!f) return; + warn_about_deprecated_remote_type("branches", remote); + strbuf_getline_lf(&buf, f); fclose(f); strbuf_trim(&buf); @@ -374,6 +395,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 +594,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 +606,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 +749,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 a7e5c4e07c..45b0c9babb 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 08424e878e..e96ac8c767 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 3b3991ab86..04d8a96367 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 320d26796d..4e6026c611 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 9d693eb57f..e705aedbf4 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 '