pub struct GitRepository { /* private fields */ }Expand description
git2-based repository implementation used by gcop-rs.
Implementations§
Source§impl GitRepository
impl GitRepository
Trait Implementations§
Source§impl GitOperations for GitRepository
impl GitOperations for GitRepository
Source§fn get_uncommitted_diff(&self) -> Result<String>
fn get_uncommitted_diff(&self) -> Result<String>
Returns the diff for unstaged changes. Read more
Source§fn get_commit_diff(&self, commit_hash: &str) -> Result<String>
fn get_commit_diff(&self, commit_hash: &str) -> Result<String>
Returns the diff for a specific commit. Read more
Source§fn get_range_diff(&self, range: &str) -> Result<String>
fn get_range_diff(&self, range: &str) -> Result<String>
Returns the diff for a commit range. Read more
Source§fn get_file_content(&self, path: &str) -> Result<String>
fn get_file_content(&self, path: &str) -> Result<String>
Reads the complete content of a file. Read more
Source§fn get_current_branch(&self) -> Result<Option<String>>
fn get_current_branch(&self) -> Result<Option<String>>
Returns the current branch name. Read more
Source§fn get_diff_stats(&self, diff: &str) -> Result<DiffStats>
fn get_diff_stats(&self, diff: &str) -> Result<DiffStats>
Calculates diff statistics. Read more
Source§fn has_staged_changes(&self) -> Result<bool>
fn has_staged_changes(&self) -> Result<bool>
Checks whether the index contains staged changes. Read more
Source§fn get_commit_history(&self) -> Result<Vec<CommitInfo>>
fn get_commit_history(&self) -> Result<Vec<CommitInfo>>
Returns commit history for the current branch. Read more
Source§fn get_commit_line_stats(&self, hash: &str) -> Result<(usize, usize)>
fn get_commit_line_stats(&self, hash: &str) -> Result<(usize, usize)>
Returns line-level diff statistics for a single commit. Read more
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more