In git2@0.21.0 we have added SHA-256 support behind an unstable Cargo feature unstable-sha256.
|
# Experimental SHA256 OID support, |
|
# reflecting upstream libgit2's GIT_EXPERIMENTAL_SHA256. |
|
# |
|
# This is an ABI-breaking change. |
|
# Future releases with this feature may introduce breakages without notice |
|
# Use at your own risk. |
|
# |
|
# Library authors: |
|
# DO NOT enable this feature by default in your dependencies. |
|
# Due to Cargo's additive features, |
|
# downstream users cannot deactivate it once enabled. |
|
# |
|
# NOTE: libgit2's builtin SHA256 implementation is not thread-safe. |
|
# Enable the `https` feature to route hashing through thread-safe OpenSSL impl. |
|
# See https://github.com/rust-lang/git2-rs/issues/1255. |
|
unstable-sha256 = ["libgit2-sys/unstable-sha256"] |
It is done this way because the upstream libgit2 v1.9 also marks it as experimental. The plan in upstream is that there will be a stable SHA-256 support (+ reftable I believe) in libgit2 v2, and it is coming: libgit2/libgit2#7149 (reply in thread). We should move it out from unstable when upstream is ready.
cc #1090
In git2@0.21.0 we have added SHA-256 support behind an unstable Cargo feature
unstable-sha256.git2-rs/Cargo.toml
Lines 37 to 52 in dffaf27
It is done this way because the upstream libgit2 v1.9 also marks it as experimental. The plan in upstream is that there will be a stable SHA-256 support (+ reftable I believe) in libgit2 v2, and it is coming: libgit2/libgit2#7149 (reply in thread). We should move it out from unstable when upstream is ready.
cc #1090