🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1104

Re: discussion: sha1/sha256 repositories and convert_commit_object

#1104
From: "brian m. carlson"
Date: Wed, 21 Oct 2026 22:21
91 lines
12652 bytes
--5fFluT4XzCRMhHaH
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2026-10-21 at 17:37:13, Adam Majer wrote:
> Hi,

Hey,

> I'm been experimenting with having both OID types in a repository. First,=
 I
> tried nodejs, which failed due to missing submodules, so I could not impo=
rt
> it.. Then I tried linux. This proved somewhat more problematic.
>=20
> I've been using convert_commit_object to convert a commit from one OID ty=
pe
> to another. The current implementation of convert_commit_object function =
has
> some comments about requiring to convert all types of OID references. The=
se
> includes mergetag and it just bails on other, unknown headers.
>=20
> In the linux tree, some dozen or so mergetags contain references that do =
not
> seem to be fetchable from anywhere.

I had noticed that the mergetags were not in Linus's repository, but I
hadn't tried other repositories on kernel.org.

> Also, a number of commits in linux history contains these unknown headers:
>=20
> ab5af2903baa472930c94a421efdd22a49036213:
>   predecessor bc6a71940d5182103469a479d12f4266ac155a39
>   predecessor-op rebase
>=20
> 3a413ece2504c70aa34a20be4dafec04e8c741f9:
>   predecessor 86d97728d053d6584be5592480ff3687d3d616ab
>   predecessor-op amend
>=20
> And the objects references here are unavailable.

We won't try to convert arbitrary headers like this.  However, I'm fine
with us skipping those headers so that their commits can be converted.

> How can we deal with these if we ever want to have the sha1-sha256 intero=
p?
> If we require stubborn adherence to 1-1 mappings of all OIDs, these
> repositories cannot ever be imported into sha256 repositories with their
> histories. Even recent commits cause issues here as git is not holding on=
 to
> referenced objects.
>=20
> Would it be possible to have a little different approach? For example,
> mergetag headers and other unknown headers, maybe we can consider these as
> just text and copy verbatim in convert_commit_object? I understand this
> would result in different commit ids, depending if coming originally from
> sha256 or sha1 repo, but since git is not really preserving references to
> these objects anyway, this may call for a little flexibility.

I don't think I converted mergetag entries in my original series.  The
problem is that if we don't convert them, then we also can't validate
them because we don't know what data they point to.  We don't make
assumptions based on the size of the hash because in the future we might
also have SHA3-256 or BLAKE2b-256.

That means that the original point of the mergetags, to preserve the
signature and contents of the original tag, would be useless.  That
doesn't mean we couldn't skip converting them, but it does mean that if
we do so, we should probably just stop writing those headers because
they're no longer fit for purpose and we should consider them a failed
implementation.
--=20
brian m. carlson (they/them)
Toronto, Ontario, CA

--5fFluT4XzCRMhHaH
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

wr0EABYKAG8FgmrZOt8JEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZ4jwfdRg9hRQUvsnkf9xDtW9i6MCmZwk9UY2xy6/gSxC
FiEECCzmip28ZfuD0cORfAxJYoiHooEAAGstAP0Wpb4LEGs4pCqSi6nJxwzFaFIY
d1vt8qTouz0rm5AvYAD/RtigzYn3aKTW2LBTnBG9ScZ0Cx+ZIAhfyYBnl4/5XgA=
=esqa
-----END PGP SIGNATURE-----

--5fFluT4XzCRMhHaH--
Technical Details
Message-ID: <atk63xoG773PzGq7@fruit.crustytoothpaste.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72794-linux-kernel-git=dewy.ru
References: <ce3756bc-704c-41ff-bf8a-c060a2848aeb@zombino.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72794-linux-kernel-git=dewy.ru
From: sandals@crustytoothpaste.net ("brian m. carlson")
Newsgroups: linux.kernel.git
Subject: Re: discussion: sha1/sha256 repositories and convert_commit_object
Date: Wed, 21 Oct 2026 22:21:20 +0000
Organization: Usenet Network
Message-ID: <atk63xoG773PzGq7@fruit.crustytoothpaste.net>
References: <ce3756bc-704c-41ff-bf8a-c060a2848aeb@zombino.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="5fFluT4XzCRMhHaH"
Injection-Info: usenet.network;
	logging-data="76853"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rLvbka4ORLzaxW2vcfs8ZqQR9bs= sha256:IeOQDjWu7ooVQxJnhDoVIRFpXQrWrn7rVxd7+x3hspw=
	sha1:vsHCPiGi9x6LxnwC08me9N34Q8E= sha256:Er536y4Jl/AqPY1PbN1CIe5KUHYgR13zoTcdaq3xSlo=
Content-Disposition: inline
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id E692A111147; Thu, 22 Oct 2026 01:21:45 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (3072-bit key)
	header.d=crustytoothpaste.net
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id rpvGnnbbAgw9;
	Thu, 22 Oct 2026 01:21:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72794-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id C709E111138; Thu, 22 Oct 2026 01:21:34 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 4B25934D59; Wed, 21 Oct 2026 22:21:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792621291;
	b=D36vP6QexuxmP3hAvgTNgWfMyI0arkXym3oSqyDVYZaIk8QPgP7wsfvzVijgoAF8igiX
	 FHgh+ZFwgLeQhHLHmqTkcOBdkeN4pRs3Z8QFVq/EfqTZeuvf4sWyTPxrFPgDjfTKQYO9G
	 QhrwxAsisWyWCVS23RbNnjdo2R6ZYt/CWXOOVZ2B//usAMLIvaxhKvBcvg+5oesVfnFN4
	 tiSFgQXT2Bj2f+A2SAyfNM94sOsk2btSG6Al2QcXBcZyg285bmez+lNzhegUEyf36ElR1
	 sQTRKHgDnXX1SNO4QVY4Ec7BG7AuO/B8cifIr+MgwZEWEXsBNMUHiiZek5CDBxEXnAA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792621291;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=n2Sb/s9L1vD2lJZKQGvDbQYLLOkEZwWSw/qPLq4Ymoc=;
	b=QBghFH0rUUfaIQvBOx5/YgUvNjbk8kETd8gN55Ps+XVhI3HukT4brtWGwGgj+sd9Gb+0
	 V6gSJJb3x/+YSmTJJbd1xg9nsGWXHS8El/R0ZpAxJqPRdcvU0bbDRI/8xQpOd8Dflwad8
	 r1wXR4PEm/Dv8bSNjf4Cwlhodk/i76SBOEJ+P5D4tEWuyC6/rkFcW7PaQYk7UqYM1daDC
	 gVf0rvFU52EMshS72BpHmvM+RklBEvO743Sqw7rcWAunJvXTLITAs5/FzIX+NGVZh8QvF
	 lxn0MgtqLc53eENs5w9d3ILxmq2YPSeE9sq0YovO8UhV0AIF9vN+YrFcbtWZUjYT+Kg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b="zB/L18l+";
	dmarc=none header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id F211F606A320;
	Wed, 21 Oct 2026 22:21:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (3072-bit key, unprotected) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=zB/L18l+
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=172.105.7.114
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792621290;
	b=5fgBQSfHPOcMVEQiMVzmROimk90pE3vq7L+bTrBg4ACI0OAXDZng65DCz3JWg2odftCm
	 0ZxDm3Ei9IhV10uPMtBEyHjR+LrZV9PSBkNvwZXmfiJWqNRFWhyfBUXgxesTHBofifpKP
	 USwX4rFSd4O+xWlqm4TZFpJLbfh8qqGmXq4XUvLgkNpNUBoKaAM0IqP83elDMcHyv6Dkx
	 vY/pK8S7X9M73udrsN+uqHOwk9eqxA3hhIap2wEqv5/zRam/xPnXu5ASAJNuFjZYr/KxM
	 mRJ7aoY8BUkPUtyQj4Xgw4ImsMaevjZYXy4k7tD6gaLnxtNELeWDFuXHnr1LBBcTvoQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792621290;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=n2Sb/s9L1vD2lJZKQGvDbQYLLOkEZwWSw/qPLq4Ymoc=;
	b=GfSHE1TJtBU9UGE4BQ8OQFeuKJorJtYbbqIUXGQPGFQZmOQEDEwwEyTIEJEzUn3dCMQn
	 wOI3jVVjQtCDpidHc1DcaTSDzqCqWIhfxr+SN4tPtbMxq2QwLtMQbS3Hhe2n+1x0Spj9h
	 vR3bLKlMg2HpWQdi7vFieDw68TOJMZvdfeNz/q3UmUTRvPDywASCdkVZxiyqa13H9NRNr
	 /eJnNNXJcf9YOZ8LC+covvil9E3DHi74KYdbYV/jF2pyXM94ag5fSWL/QjV7ISE2ynS2p
	 Q5LmEiKL60YSvsd/efDBPND2tpDvK9Kike68GTpCLSAtXTNwjMLrcZiRh68F9FOz4RQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b="zB/L18l+";
	arc=none smtp.remote-ip=172.105.7.114
X-Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D041C606A319
	for <git@vger.kernel.org>; Wed, 21 Oct 2026 22:21:28 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D041C606A319
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net;
	s=default; t=1792621281;
	bh=BRuMq+xDe6u5xf6emIZTHxNUzsKF00ZbIjSTi4ekieY=;
	h=Date:From:To:Cc:Subject:References:Content-Type:
	 Content-Disposition:In-Reply-To:From:Reply-To:Subject:Date:To:CC:
	 Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References:
	 Content-Type:Content-Disposition;
	b=zB/L18l+T5WHSqBMSIPkT2Wy+U60qtqmCrISSAIoVmKYkCv8MPPatQds9y4t8jURS
	 cbfc2t0oDoO4VhNEvwzetO34y+7npNzIIPSutSrTn19cpp4C0aYSbIdIiPVVzdVG9F
	 qm5pz4te/S9I31xjZSGJO2xGP3/s2xm9CMFpd/sGK+mTvKsCOG0JR1P5pAodQ/fsB9
	 5vaZw3oWyapVRYwTmmlaXKPUTLocorIB9mVDGy2Bv+LNVpBMlbP6S03wYhwynjZJv8
	 pKg0U7uRATfeJV7h4lGWI5qfoivSwuQAGpU/4N7ywRtO/hTsBLpnmWD/Q/YZhsvG+Y
	 MrTLtvYAZzNswIEAzG+18OXypxYoZDPl9A2eU6tQU2x1MahaN3QYF0q+peRh2TFD9s
	 uC8eO5jJouIgAy1Y2ipiHot/yGyXjRRrUYXX3j7URMq1cbZr0tKK2n+YmiyfAeYIYs
	 UtTiGVHgQsiAxCG7WBet804KEIcipge8fS6MNMjqp7TbI5FmEuq
X-Received: from fruit.crustytoothpaste.net (unknown [IPv6:2607:f2c0:f00f:f901:964b:4716:5e4c:1d15])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by complex.crustytoothpaste.net (Postfix) with ESMTPSA id B4FCC2006B;
	Wed, 21 Oct 2026 22:21:21 +0000 (UTC)
X-Cc: git@vger.kernel.org, "Eric W. Biederman" <ebiederm@xmission.com>
X-Mail-Followup-To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Adam Majer <adamm@zombino.com>, git@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <ce3756bc-704c-41ff-bf8a-c060a2848aeb@zombino.com>
X-User-Agent: Mutt/2.4.1 (2026-07-04)