From: Martin Wilck Date: Mon, 17 Nov 2025 08:53:07 GMT Subject: Re: [PATCH v2 1/2] object-file: disallow adding submodules of different hash algo Message-ID: <8263691a45d0a425d24a796c547315932e8c4001.camel@suse.com> In-Reply-To: <20251115005818.2271557-1-sandals@crustytoothpaste.net> On Sat, 2025-11-15 at 00:58 +0000, brian m. carlson wrote: > > Note that we cannot check this in git fsck because the malformed > submodule is stored in the tree as an object ID which is either > truncated (when a SHA-256 submodule is added to a SHA-1 repository) > or > padded with zeros (when a SHA-1 submodule is added to a SHA-256 > repository).  We cannot detect even the latter case because someone > could have an actual submodule that actually ends in 24 zeros, which > would be a false positive. Perhaps a warning could still be printed in this case? After all, the probability for a false positive is about 1:16 million. Thanks Martin