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

Function to_core_oid

atomic-cli/src/commands/git/shadow.rs:1768–1774  ·  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

1766
1767/// The algorithm-tagged core identity of a libgit2 object id.
1768fn to_core_oid(oid: git2::Oid) -> CliResult<atomic_core::operation::GitObjectId> {
1769 atomic_core::operation::GitObjectId::new(
1770 atomic_core::operation::GitHashAlgorithm::Sha1,
1771 oid.as_bytes().to_vec(),
1772 )
1773 .map_err(|error| git_error(error.to_string()))
1774}
1775
1776/// Deterministic projection crash points (opt-in instrumentation, CB-8B
1777/// ac-3): compiled only with the `adoption-test-injection` feature. Each

Callers 3

build_switch_projectionFunction · 0.85

Calls 2

git_errorFunction · 0.70
as_bytesMethod · 0.45

Tested by

no test coverage detected