pub struct GitRepository {
pub root_dir: PathBuf,
}Fields§
§root_dir: PathBufImplementations§
Source§impl GitRepository
impl GitRepository
Sourcepub fn new<P: AsRef<Path>>(repository_path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(repository_path: P) -> Result<Self>
Create a new GitRepository instance for the given path Returns an error if the path is not a valid Git repository
Sourcepub fn commit_hash(&self) -> Result<String>
pub fn commit_hash(&self) -> Result<String>
Get the current commit hash (HEAD)
pub fn diff_files( &self, old_commit_hash: &str, ) -> Result<(Vec<PathBuf>, Vec<PathBuf>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitRepository
impl RefUnwindSafe for GitRepository
impl Send for GitRepository
impl Sync for GitRepository
impl Unpin for GitRepository
impl UnsafeUnpin for GitRepository
impl UnwindSafe for GitRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more