pub struct GitClient { /* private fields */ }Expand description
Git repository client using system git CLI.
Implementations§
Source§impl GitClient
impl GitClient
Sourcepub fn detect(path: &Path) -> Result<Self>
pub fn detect(path: &Path) -> Result<Self>
Detect if the given path is inside a git repository. Returns a GitClient rooted at the repository root.
Sourcepub fn file_churn(&self, since: &str) -> Result<Vec<FileChurn>>
pub fn file_churn(&self, since: &str) -> Result<Vec<FileChurn>>
Get file change frequency within the given time window.
since is passed directly to git log --since, e.g. “90 days ago”, “2025-01-01”.
Sourcepub fn commit_count(&self, since: &str) -> Result<usize>
pub fn commit_count(&self, since: &str) -> Result<usize>
Get total commit count in the given time window.
Auto Trait Implementations§
impl Freeze for GitClient
impl RefUnwindSafe for GitClient
impl Send for GitClient
impl Sync for GitClient
impl Unpin for GitClient
impl UnsafeUnpin for GitClient
impl UnwindSafe for GitClient
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