MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / open

Function open

crates/flowtrace-cli/src/git.rs:63–66  ·  view source on GitHub ↗

Open the repo that owns `root`. Walks up from `root` so a trace folder nested inside a parent repo resolves to that parent (single-repo layout). When `root` itself is a repo, opens that.

(root: &Path)

Source from the content-addressed store, hash-verified

61/// nested inside a parent repo resolves to that parent (single-repo layout).
62/// When `root` itself is a repo, opens that.
63fn open(root: &Path) -> Result<Repository> {
64 Repository::open_ext(root, RepositoryOpenFlags::empty(), &[] as &[&Path])
65 .with_context(|| format!("opening git repo from {}", root.display()))
66}
67
68/// Open the containing repo, or initialize one at `root` if no ancestor is a repo.
69fn open_or_init(root: &Path) -> Result<Repository> {

Callers 7

mainFunction · 0.85
open_or_initFunction · 0.85
head_shaFunction · 0.85
commits_underFunction · 0.85
with_subtree_atFunction · 0.85
introducing_commitsFunction · 0.85
show_at_with_blob_shaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…