MCPcopy Create free account
hub / github.com/emwalker/digraph / ensure

Method ensure

backend/src/git/core/mod.rs:39–42  ·  view source on GitHub ↗
(root: &DataRoot, repo_id: RepoId)

Source from the content-addressed store, hash-verified

37
38impl Repo {
39 pub fn ensure(root: &DataRoot, repo_id: RepoId) -> Result<Self> {
40 let path = root.repo_path(repo_id);
41 Self::open(path)
42 }
43
44 pub fn open(path: PathBuf) -> Result<Self> {
45 match git2::Repository::open(&path) {

Callers

nothing calls this directly

Calls 3

ensureFunction · 0.85
repo_pathMethod · 0.80
commit_oidMethod · 0.80

Tested by

no test coverage detected