Files
Marian BuschsiewekeandGitHub 9c61d58f5f feat(helix-loader): add support for SHA256 git repos for grammars (#15466)
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
2026-05-27 08:46:08 -05:00
..