pub struct GitAnalyzer { /* private fields */ }Expand description
Git repository analyzer Clones and analyzes git repositories to extract commit history
Implementations§
Source§impl GitAnalyzer
impl GitAnalyzer
Sourcepub fn clone_repository(&self, repo_url: &str, name: &str) -> Result<()>
pub fn clone_repository(&self, repo_url: &str, name: &str) -> Result<()>
Clone a repository to the cache directory
§Arguments
repo_url- Git repository URL (https)name- Local name for the repository
§Returns
Ok(())if successfulErrif clone fails
§Examples
let analyzer = GitAnalyzer::new(PathBuf::from("/tmp/repos"));
analyzer.clone_repository("https://github.com/rust-lang/rust", "rust")?;Sourcepub fn analyze_commits(
&self,
name: &str,
limit: usize,
) -> Result<Vec<CommitInfo>>
pub fn analyze_commits( &self, name: &str, limit: usize, ) -> Result<Vec<CommitInfo>>
Analyze commits in a cloned repository
§Arguments
name- Repository name (must be already cloned)limit- Maximum number of commits to analyze
§Returns
Ok(Vec<CommitInfo>)with commit informationErrif repository not found or analysis fails
§Examples
let analyzer = GitAnalyzer::new(PathBuf::from("/tmp/repos"));
analyzer.clone_repository("https://github.com/rust-lang/rust", "rust")?;
let commits = analyzer.analyze_commits("rust", 100)?;Auto Trait Implementations§
impl Freeze for GitAnalyzer
impl RefUnwindSafe for GitAnalyzer
impl Send for GitAnalyzer
impl Sync for GitAnalyzer
impl Unpin for GitAnalyzer
impl UnwindSafe for GitAnalyzer
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