pub struct GitRepository { /* private fields */ }Expand description
Git repository wrapper
Implementations§
Source§impl GitRepository
impl GitRepository
Sourcepub fn get_working_directory_status(&self) -> Result<WorkingDirectoryStatus>
pub fn get_working_directory_status(&self) -> Result<WorkingDirectoryStatus>
Get working directory status
Sourcepub fn is_working_directory_clean(&self) -> Result<bool>
pub fn is_working_directory_clean(&self) -> Result<bool>
Check if working directory is clean
Sourcepub fn repository(&self) -> &Repository
pub fn repository(&self) -> &Repository
Get access to the underlying git2::Repository
Sourcepub fn get_current_branch(&self) -> Result<String>
pub fn get_current_branch(&self) -> Result<String>
Get current branch name
Sourcepub fn branch_exists(&self, branch_name: &str) -> Result<bool>
pub fn branch_exists(&self, branch_name: &str) -> Result<bool>
Check if a branch exists
Sourcepub fn get_commits_in_range(&self, range: &str) -> Result<Vec<CommitInfo>>
pub fn get_commits_in_range(&self, range: &str) -> Result<Vec<CommitInfo>>
Parse commit range and get commits
Source§impl GitRepository
impl GitRepository
Auto Trait Implementations§
impl Freeze for GitRepository
impl RefUnwindSafe for GitRepository
impl Send for GitRepository
impl !Sync for GitRepository
impl Unpin 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