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

Method git_tree_oid

atomic-cli/src/commands/git/shadow.rs:89–101  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

87 }
88
89 pub(crate) fn git_tree_oid(&self) -> CliResult<git2::Oid> {
90 if self.git_tree.algorithm() != GitHashAlgorithm::Sha1 {
91 return Err(git_error(format!(
92 "Git publication through libgit2 does not support {:?} repositories",
93 self.git_tree.algorithm()
94 )));
95 }
96 git2::Oid::from_bytes(self.git_tree.as_bytes()).map_err(|error| {
97 git_error(format!(
98 "verified Git tree has an invalid object identity: {error}"
99 ))
100 })
101 }
102
103 pub(crate) fn bind_committed_head(
104 &mut self,

Callers 6

bind_committed_headMethod · 0.80
build_switch_projectionFunction · 0.80
align_index_to_treeFunction · 0.80
stage_and_validate_treeFunction · 0.80

Calls 3

git_errorFunction · 0.70
algorithmMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected