🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1066

discussion: sha1/sha256 repositories and convert_commit_object

#1066
From: Adam Majer
Date: Wed, 21 Oct 2026 17:37
46 lines
8666 bytes
Hi,

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 import it.. Then I tried linux. This proved somewhat more 
problematic.

I've been using convert_commit_object to convert a commit from one OID 
type to another. The current implementation of convert_commit_object 
function has some comments about requiring to convert all types of OID 
references. These includes mergetag and it just bails on other, unknown 
headers.

In the linux tree, some dozen or so mergetags contain references that do 
not seem to be fetchable from anywhere.

Also, a number of commits in linux history contains these unknown headers:

ab5af2903baa472930c94a421efdd22a49036213:
   predecessor bc6a71940d5182103469a479d12f4266ac155a39
   predecessor-op rebase

3a413ece2504c70aa34a20be4dafec04e8c741f9:
   predecessor 86d97728d053d6584be5592480ff3687d3d616ab
   predecessor-op amend

And the objects references here are unavailable.


How can we deal with these if we ever want to have the sha1-sha256 
interop? 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.

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.

Best regards,
- Adam
Technical Details
Message-ID: <ce3756bc-704c-41ff-bf8a-c060a2848aeb@zombino.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72752-linux-kernel-git=dewy.ru

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-72752-linux-kernel-git=dewy.ru
From: adamm@zombino.com (Adam Majer)
Newsgroups: linux.kernel.git
Subject: discussion: sha1/sha256 repositories and convert_commit_object
Date: Wed, 21 Oct 2026 19:37:13 +0200
Organization: Usenet Network
Message-ID: <ce3756bc-704c-41ff-bf8a-c060a2848aeb@zombino.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="21999"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7Yt4OQQUulruFZR3kr7JtnSlEdg= sha256:uMWJpgbG7zpEmafx+DNn38QHuL7JA5GxrMpW5kSi+VE=
	sha1:QsUs6xVsOVOaxef/a16I7HbH2BE= sha256:dK0BYFb32XYq4hGby1hSNWyMC6LFmisOJivJRWZxG6Y=
Content-Language: en-US
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 5B68B1110C2; Wed, 21 Oct 2026 20:44:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.95
X-Spam-Status: No, score=-2.95 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=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] autolearn=ham autolearn_force=no
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 DKa_ogY5vx70;
	Wed, 21 Oct 2026 20:44:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72752-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=zombino.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 7F1BA11105F; Wed, 21 Oct 2026 20:44:10 +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 1EFFC31B6C; Wed, 21 Oct 2026 17:39:40 +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=1792604379;
	b=V/FgMxcaK0DEe4G0IHYqueowt2stdOnciN/i7CASR7NvKZ5dHsS9UN2FXwYAqI095G3o
	 z1JwUTLDlQcgEB0r5QQkIxO+8PzSuhn+qDuPV32nHxMoXgWLjN3Uel3ITcNW8/yXMJ9+v
	 NgOFisEfDD4YDRhjT/zHW2xMb6knbvmJNYtIhxB0Y27Gvdmt83hJ6eM62b7NFe1gP2QqG
	 8FInh124OPFhAx93X29XF1cwj7df8jII/wo8jt58xlxCR3drdqg72BdEMw7WQzj6uNcvZ
	 6qNXfQ/EuoEgTBhlIwXM+uKA+vBmbn9tf3usvSwMoR+8E6jUQp/ULshpbh8Sc6ykQsw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792604379;
	h=X-Original-To:Received:DMARC-Filter:Received:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:From:
	 Subject:To:Cc:Content-Language:Content-Type:
	 Content-Transfer-Encoding;
	bh=0uNcyODTkLsW1fAdWPYWlRUDS9supBNam+H5e6ihd+4=;
	b=5lt1qJsuttJK1q/ke6uf2dx/dsye8/IgJf8DdzQSh46iwZpgsGvWzGp3XkAXVfDn7i7y
	 vKel8KgjhTP4eWsv5eIhgnUhVjjD7J/dQ6dUqMiD4tlCbo50rTSivb0gsjK5XS2A4g9w5
	 fjk4d8hma48Ri4piC5kd3sH3Qzfj9XCApQ32+S5tf6jsjD/WLhMs1pYRXHbF0jtU4Lef5
	 ETn4flRq8sZzWZxhh+wJHUjOLO7Vnzf6enshAFiDHefPL5nZ1Rco/6JAO62Jgk4F7mUFM
	 WSgOb1CZsUYNEtFA54zqenR42k5z5YMD+QKPmWECgmURW2z9ven0xwO0Mjldhi2J4cw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=zombino.com;
	spf=pass smtp.mailfrom=zombino.com;
	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 4FCAB606A323;
	Wed, 21 Oct 2026 17:39:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.107.222.152
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792604378;
	b=xOlAEpm8/EXal/z2e08QqHjE2jo9Zs2yK9ivGUyO1Dd9c3FEPAlBxwANECHtCukwooHl
	 0uiR4Sbn6Z8xlfYQpJAJXUq3CsJ2e2/u0eQ3HsAi+TChMDkXBcbstG+l6JTwqqXOJomfF
	 xEbHUPotettuMM6ACyDNIkPsix5p3iqSWiN6g15KvkrkU0btuOymSeWU6FkuZ+cPL0lxC
	 QQCk6YCNrLnQk8c9jvJOmQICbsk7Z+oxut6vg6yoD/HYHqkKXV//6VDTLKEoBOAlaqELo
	 dZy4WxI33J/R/WupHdNHfxOyvQ0SBtLpjNt00/FzxxUToCgz3GWw84NOjZOpGkH3p3Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792604378;
	h=DMARC-Filter:Received:Message-ID:Date:MIME-Version:User-Agent:From:
	 Subject:To:Cc:Content-Language:Content-Type:
	 Content-Transfer-Encoding;
	bh=0uNcyODTkLsW1fAdWPYWlRUDS9supBNam+H5e6ihd+4=;
	b=3+RWbxEoST/1EHFMprD4deOpAcR7OlCj2NxOFdXSp0Uf6eWxDbowIg1q/X3m3t7JuxYO
	 budsXbMyodqM3jRJ5uwFRBxq69TEUJukL6OvFAgzCG/UpD4ku++3SNGle/OPjFBmXrQhN
	 p9XvkWfKfQmWt1QFfmWSvqvjXMyaRQ6o1ax9emCmsXqu+csbtzFf5rzcfYNmeG0YiAawh
	 53i9Qn51Cmc2GmdmY+bgYrjh6lQYoIpZkIF5a2tNrlw8FpYd4KVsrvKdR1MOqvpfhHEpj
	 aDtp2dg/LVNiiZx6VtU+vopOIFY67wBZqKCHIYgEGFNVcAxeOaBh6cpoZg5WvGXVZ9w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=zombino.com;
	spf=pass smtp.mailfrom=zombino.com;
	arc=none smtp.remote-ip=91.107.222.152
X-Received: from mail.zombino.com (c3.zombino.com [91.107.222.152])
	(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 68CF8606A31D
	for <git@vger.kernel.org>; Wed, 21 Oct 2026 17:39:36 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 68CF8606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zombino.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zombino.com
X-Received: from [192.168.0.135] (ipservice-092-209-243-142.092.209.pools.vodafone-ip.de [92.209.243.142])
	by mail.zombino.com (Postfix) with ESMTPS id 679631BFBD71;
	Wed, 21 Oct 2026 17:39:28 +0000 (UTC)
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-User-Agent: Mozilla Thunderbird
X-Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
 "Eric W. Biederman" <ebiederm@xmission.com>