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)
| 61 | /// nested inside a parent repo resolves to that parent (single-repo layout). |
| 62 | /// When `root` itself is a repo, opens that. |
| 63 | fn 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. |
| 69 | fn open_or_init(root: &Path) -> Result<Repository> { |
no outgoing calls
no test coverage detected
searching dependent graphs…