pub struct GitRepo { /* private fields */ }Implementations§
Source§impl GitRepo
impl GitRepo
pub fn discover() -> Result<Self>
pub fn root(&self) -> &PathBuf
pub fn has_staged_changes(&self) -> Result<bool>
pub fn has_any_changes(&self) -> Result<bool>
pub fn has_head(&self) -> Result<bool>
pub fn reset_head(&self) -> Result<()>
pub fn stage_file(&self, file: &str) -> Result<bool>
pub fn has_staged_after_add(&self) -> Result<bool>
pub fn commit(&self, message: &str) -> Result<()>
pub fn recent_commits(&self, count: usize) -> Result<String>
pub fn diff_cached(&self) -> Result<String>
pub fn diff_cached_stat(&self) -> Result<String>
pub fn diff_head(&self) -> Result<String>
pub fn status_porcelain(&self) -> Result<String>
pub fn untracked_files(&self) -> Result<String>
pub fn show(&self, rev: &str) -> Result<String>
pub fn log_range(&self, base: &str, count: Option<usize>) -> Result<String>
pub fn diff_range(&self, base: &str) -> Result<String>
pub fn current_branch(&self) -> Result<String>
pub fn head_short(&self) -> Result<String>
pub fn file_statuses(&self) -> Result<HashMap<String, char>>
Auto Trait Implementations§
impl Freeze for GitRepo
impl RefUnwindSafe for GitRepo
impl Send for GitRepo
impl Sync for GitRepo
impl Unpin for GitRepo
impl UnsafeUnpin for GitRepo
impl UnwindSafe for GitRepo
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