MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / to_core_oid

Function to_core_oid

atomic-cli/src/commands/git/shadow.rs:1956–1962  ·  view source on GitHub ↗

The algorithm-tagged core identity of a libgit2 object id.

(oid: git2::Oid)

Source from the content-addressed store, hash-verified

1954
1955/// The algorithm-tagged core identity of a libgit2 object id.
1956fn to_core_oid(oid: git2::Oid) -> CliResult<atomic_core::operation::GitObjectId> {
1957 atomic_core::operation::GitObjectId::new(
1958 atomic_core::operation::GitHashAlgorithm::Sha1,
1959 oid.as_bytes().to_vec(),
1960 )
1961 .map_err(|error| git_error(error.to_string()))
1962}
1963
1964/// Deterministic projection crash points (opt-in instrumentation, CB-8B
1965/// ac-3): compiled only with the `adoption-test-injection` feature. Each

Calls 2

git_errorFunction · 0.70
as_bytesMethod · 0.45

Tested by

no test coverage detected