//! Raw representation wrappers for libgit2 mod branch_walk; mod tree_walk; use crate::{Branch, BranchCommit}; use git2::{self, Repository}; pub type RawResult = Result; /// An error abstraction for raw git operations #[derive(Debug)] pub enum RawError { AllBad, } impl From for RawError { fn from(_: git2::Error) -> Self { Self::AllBad } } /// Represent a raw branch pub struct RawBranch { name: String, head: String, } /// Wrap a libgit2 repository to provide an API fascade pub struct RawRepository { inner: Repository, } impl RawRepository { pub fn open(path: &str) -> RawResult { Ok(Self { inner: Repository::open(path)?, }) } /// Parse branch data from repository pub fn parse_branches(&self) -> RawResult> { todo!() } }