1
2
3
4
5
6
7
8
9
10
11
12
13
//! Repo management

use std::path::Path;

use crate::error::Error;

/// A simple alias for git2::Repository
pub type GitRepository = git2::Repository;

/// Discovers the repo at or above the provided path
pub fn discover_repo(p: &Path) -> Result<GitRepository, Error> {
    Ok(git2::Repository::discover(p)?)
}