Struct GitCliRepo
pub struct GitCliRepo { /* private fields */ }Implementations§
§impl GitCliRepo
impl GitCliRepo
Trait Implementations§
§impl Repo for GitCliRepo
impl Repo for GitCliRepo
§fn walk_commits<'a>(
&'a self,
opts: &'a Options,
) -> Result<Box<dyn Iterator<Item = Result<CommitEvent>> + Send + 'a>>
fn walk_commits<'a>( &'a self, opts: &'a Options, ) -> Result<Box<dyn Iterator<Item = Result<CommitEvent>> + Send + 'a>>
Walk commits matching
opts.after/opts.before.
Returns an iterator over the resulting commit events.§fn changed_files(&self, rev: &str) -> Result<Vec<FileChange>>
fn changed_files(&self, rev: &str) -> Result<Vec<FileChange>>
Per-file changes for one commit.
§fn diff_hunks(&self, rev: &str, path: &str) -> Result<Vec<Hunk>>
fn diff_hunks(&self, rev: &str, path: &str) -> Result<Vec<Hunk>>
Hunks within one (commit, path) pair.
§fn resolve_alias(&self, name: &str, email: &str) -> String
fn resolve_alias(&self, name: &str, email: &str) -> String
.mailmap-aware author identity canonicalization. Returns the canonical
email for the given (name, email) pair after applying any matching
.mailmap rule. Read more§fn head_sha(&self) -> Result<String>
fn head_sha(&self) -> Result<String>
Return the full SHA-1 hex string of HEAD.
Used by the persistent cache to build the cache key.
§fn is_worktree_dirty(&self) -> bool
fn is_worktree_dirty(&self) -> bool
Whether tracked content differs from
HEAD — staged changes (index
vs. HEAD) or unstaged changes (worktree vs. index). Untracked
files are excluded: every caller (the calibrate-defects mining
guard, the cache-hit staleness warning, the dirty cache-write skip)
protects HEAD-time metrics computed over tracked_paths_at_head()
only. Exception: a submodule whose only change is untracked content
in its own worktree may report dirty (backend-dependent). Read more§fn merge_or_rebase_in_progress(&self) -> bool
fn merge_or_rebase_in_progress(&self) -> bool
Whether the repository is partway through a merge, rebase,
cherry-pick, or revert — an ambiguous-HEAD state where the working
tree and
HEAD no longer describe one coherent commit. True when any
of MERGE_HEAD, CHERRY_PICK_HEAD, REVERT_HEAD, rebase-merge/,
or rebase-apply/ is present in the repository’s git dir (worktree-
correct: a linked worktree keeps this state in its own git dir, not
the common one). Read more§fn read_blob_at(&self, rev: &str, path: &str) -> Result<Option<Vec<u8>>>
fn read_blob_at(&self, rev: &str, path: &str) -> Result<Option<Vec<u8>>>
Read the blob bytes at revision
rev for path (POSIX-
separated, repo-relative). rev is any git revision the backend
can resolve — a commit SHA, "HEAD", a tag, etc. Returns
Ok(None) if the path isn’t a tracked blob at that revision
(deleted there, a directory, or a submodule gitlink). Returns
Err only on real object-database I/O failure (corrupted pack,
missing shallow object) — NOT on “path doesn’t exist at rev”. Read more§fn worktree_changes(&self) -> Result<Vec<WorktreeChange>>
fn worktree_changes(&self) -> Result<Vec<WorktreeChange>>
Enumerate tracked working-tree changes vs HEAD (union of staged and
unstaged, net-classified; untracked files excluded; symlinks and
submodule pointers excluded; sorted by path). Errors on unmerged
(conflict) entries. Hint quality: backends agree via differential
tests. Read more
§fn tracked_paths_at_head(&self) -> Result<Vec<String>>
fn tracked_paths_at_head(&self) -> Result<Vec<String>>
Every regular-file blob path (the
0o100xxx mode class — canonical
100644/100755 plus legacy non-canonical variants like 100664)
in the HEAD commit’s tree, repo-relative with / separators, sorted
ascending. Symlinks (120000) and submodule gitlinks (160000) are
excluded — neither carries source bytes the HEAD-time scans can parse. Read moreReturn all git tags in this repository, sorted ascending by date,
tie-broken via [
tag_tiebreak_cmp] for same-date tags. Read more§fn is_shallow(&self) -> bool
fn is_shallow(&self) -> bool
Whether the repository is a shallow clone — history truncated at a depth
boundary, with a non-empty
.git/shallow grafts list, so commits beyond
the boundary (and the parents of the boundary commits) are absent. Read more§fn read_blob_at_head(&self, path: &str) -> Result<Option<Vec<u8>>>
fn read_blob_at_head(&self, path: &str) -> Result<Option<Vec<u8>>>
Read the blob bytes at HEAD for
path. Convenience wrapper over
read_blob_at — the HEAD-time scans’ entry
point. Backends override read_blob_at, not this. Read moreAuto Trait Implementations§
impl Freeze for GitCliRepo
impl RefUnwindSafe for GitCliRepo
impl Send for GitCliRepo
impl Sync for GitCliRepo
impl Unpin for GitCliRepo
impl UnsafeUnpin for GitCliRepo
impl UnwindSafe for GitCliRepo
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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