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

Function commit_tree_of

atomic-cli/src/commands/git/parallel.rs:1106–1110  ·  view source on GitHub ↗

The tree of commit `sha`, or `None` when it is not locally readable.

(git: &'r GitRepository, sha: &str)

Source from the content-addressed store, hash-verified

1104
1105/// The tree of commit `sha`, or `None` when it is not locally readable.
1106fn commit_tree_of<'r>(git: &'r GitRepository, sha: &str) -> Option<git2::Tree<'r>> {
1107 let oid = git2::Oid::from_str(sha).ok()?;
1108 let commit = git.find_commit(oid).ok()?;
1109 commit.tree().ok()
1110}
1111
1112#[derive(Clone)]
1113pub(crate) struct VerifiedImportCommit {

Callers

nothing calls this directly

Calls 2

treeMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected