You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds an `unstable-sha256` Cargo feature,
as a follow-up of rust-lang#1201
Also adds some smoke tests for affected operations/types.
## Insta-stable
- **NEW** `Index::with_object_format` to create with different format
- **NEW** `Oid::object_format` to access underlying oid type
## Behind `unstable-sha256`
- **NEW** `ObjectFormat::Sha256` enum variant
- **NEW** `RepositoryInitOptions::object_format()` method to set hash algo
- **NEW** `Remote::object_format` method to get hash algo on a remote
- **NEW** `Oid::raw_bytes` to return the full underlying bytes
- **CHANGED** `Diff::from_buffer` to accept an extra object format argument
- **CHANGED** `Index::open` to accept an extra object format argument
- **CHANGED** `Indexer::new` to accept an extra object format argument
- **CHANGED** `Oid::from_str` to accept an extra object format argument
- **CHANGED** `Oid::hash_{object,file}` to accept an extra object format argument
- **CHANGED** `Oid::as_bytes` to return the logic bytes (SHA1 -> 20 bytes; SHA256 -> 32 bytes)
- **CHANGED** `impl Hash for Oid` to hash `git_oid->kind`
- **REMOVED** `Index::new` to avoid misuse.
- **REMOVED** `impl std::FromStr for Oid` to avoid misuse
0 commit comments