From: Adam Majer Date: Wed, 21 Oct 2026 17:37:13 GMT Subject: discussion: sha1/sha256 repositories and convert_commit_object Message-ID: 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