mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
This would be useful for user to determine whether they want to proceed or bail further remote operations. Particularily useful for downstream libgit2 bindings and applications to experiment SHA256 support behind a runtime feature flag. For example, `cargo` could compile with sha256 support unconditionally, but reject SHA256 usage at runtime if the `-Zgit=sha256` nightly flag was not on. Cargo would leverage this new API to determine if users are trying to fetch a SHA256 remote repository and bail when needed before any fetches happen. Note that this is not gated behind `GIT_EXPERIMENTAL_SHA256` as the oid_type is sha1 and available always.