mirror of
https://github.com/helix-editor/helix
synced 2026-08-05 14:42:57 +02:00
The helix-loader is currently running a `git init` prior to fetching objects. This initialize the git repo with the default object format, which currently is SHA1. A subsequent `fetch` will fail if the repo instead uses SHA256. The same issue will pop up when `git init` will change the default to SHA256: A fetch from a SHA1 repo will then fail, as the init was down with SHA256. This adds an explicit object format argument to the rust functions, and extends the TOML format in a backward compatible way: 1. If the revision is prefixed `sha256:`: use SHA256 2. If the revision is prefixed `sha1:`: use SHA1 3. If the revision is a valid SHA256 hash (which is longer than a valid SHA1 hash): use SHA256 4. In any other case: Use SHA1