Skip to main content

find_git_dir

Function find_git_dir 

Source
pub fn find_git_dir(repo_path: &Path) -> Result<Option<GitDir>>
Expand description

Inspect repo_path and determine whether it is a git repository, and if so whether it is bare.

Returns Ok(None) if the directory exists but is not a repo; that maps to a 404 at the HTTP layer.