Skip to main content

open_local_repo

Function open_local_repo 

Source
pub fn open_local_repo(path: &Path) -> Result<PathBuf>
Expand description

Verify that path is inside a git repository and return the canonical repository root (the working-tree top level, or the given path for a bare repo). Runs no network I/O.

ยงErrors

Returns an error if path is not a git repository.