(&self)
| 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, |
no test coverage detected