pub struct GitBackend { /* private fields */ }Expand description
Git backend.
Uses gix::ThreadSafeRepository so the struct is natively Send + Sync
without any mutex. Each method obtains a cheap thread-local repository view
via gix::ThreadSafeRepository::to_thread_local, eliminating serialization
under concurrent async load.
Implementations§
Trait Implementations§
Source§impl VcsBackend for GitBackend
impl VcsBackend for GitBackend
fn status_digest(&self) -> Result<StatusDigest>
fn local_branches(&self) -> Result<Vec<BranchInfo>>
fn remote_branches(&self) -> Result<Vec<BranchInfo>>
fn list_commits(&self) -> Result<Vec<CommitInfo>>
fn list_commits_sorted(&self, order: SortOrder) -> Result<Vec<CommitInfo>>
fn log_since( &self, since: SystemTime, until: SystemTime, ) -> Result<Vec<CommitInfo>>
fn find_commit(&self, id: &CommitId) -> Result<CommitInfo>
fn create_tag(&self, name: &str) -> Result<()>
fn create_annotated_tag(&self, name: &str, message: &str) -> Result<()>
fn delete_tag(&self, name: &str) -> Result<()>
fn diff(&self, from: &CommitId, to: &CommitId) -> Result<DiffSummary>
fn remote_url(&self, name: &str) -> Option<String>
Source§fn is_dirty(&self) -> Result<bool>
fn is_dirty(&self) -> Result<bool>
Returns
true if the working tree has any uncommitted changes
(staged or unstaged). Read moreSource§fn merge_base(&self, a: &CommitId, b: &CommitId) -> Result<Option<CommitId>>
fn merge_base(&self, a: &CommitId, b: &CommitId) -> Result<Option<CommitId>>
Returns the best common ancestor of commits
a and b, or None
if there is no shared history.Source§fn is_ancestor(
&self,
candidate: &CommitId,
descendant: &CommitId,
) -> Result<bool>
fn is_ancestor( &self, candidate: &CommitId, descendant: &CommitId, ) -> Result<bool>
Returns
true if candidate is a direct or transitive ancestor of
descendant (a commit is considered its own ancestor).Source§fn blame(&self, path: &Path) -> Result<Vec<BlameEntry>>
fn blame(&self, path: &Path) -> Result<Vec<BlameEntry>>
Returns per-line commit attribution for
path at HEAD. Read moreSource§fn worktree_status(&self) -> Result<WorktreeStatus>
fn worktree_status(&self) -> Result<WorktreeStatus>
Returns per-file working-tree status (staged changes, unstaged changes,
and untracked files).
Source§fn file_at_commit(&self, path: &Path, commit_id: &CommitId) -> Result<Vec<u8>>
fn file_at_commit(&self, path: &Path, commit_id: &CommitId) -> Result<Vec<u8>>
Returns the raw content of
path (relative to the repository root)
as it exists in the tree of commit_id. Read moreSource§fn submodules(&self) -> Result<Vec<SubmoduleInfo>>
fn submodules(&self) -> Result<Vec<SubmoduleInfo>>
Returns metadata for all submodules declared in
.gitmodules.
Returns an empty Vec when no submodules are configured.Source§fn stash_entries(&self) -> Result<Vec<StashEntry>>
fn stash_entries(&self) -> Result<Vec<StashEntry>>
Returns all stash entries (newest first), or an empty
Vec if the
stash is empty.Auto Trait Implementations§
impl !Freeze for GitBackend
impl !RefUnwindSafe for GitBackend
impl !UnwindSafe for GitBackend
impl Send for GitBackend
impl Sync for GitBackend
impl Unpin for GitBackend
impl UnsafeUnpin for GitBackend
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