gitcc_git/
repo.rs

1//! Repo management
2
3use std::path::Path;
4
5use crate::error::Error;
6
7/// A simple alias for git2::Repository
8pub type GitRepository = git2::Repository;
9
10/// Discovers the repo at or above the provided path
11pub fn discover_repo(p: &Path) -> Result<GitRepository, Error> {
12    Ok(git2::Repository::discover(p)?)
13}