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

Function git_object_id

atomic-cli/src/commands/git/parallel.rs:1722–1728  ·  view source on GitHub ↗
(algorithm: GitHashAlgorithm, oid: Oid)

Source from the content-addressed store, hash-verified

1720}
1721
1722pub(crate) fn git_object_id(algorithm: GitHashAlgorithm, oid: Oid) -> CliResult<GitObjectId> {
1723 GitObjectId::new(algorithm, oid.as_bytes().to_vec()).map_err(|error| {
1724 git_error(format!(
1725 "Git object ID {oid} does not match {algorithm:?}: {error}"
1726 ))
1727 })
1728}
1729
1730/// Tagged Git object ID for a commit SHA string.
1731pub(crate) fn git_object_id_for_sha(

Calls 2

git_errorFunction · 0.70
as_bytesMethod · 0.45

Tested by

no test coverage detected