pub struct Git2Repository { /* private fields */ }Expand description
Repository implementation backed by libgit2.
Implementations§
Trait Implementations§
Source§impl Blamer for Git2Repository
impl Blamer for Git2Repository
Source§impl Committer for Git2Repository
impl Committer for Git2Repository
Source§impl ConfigReader for Git2Repository
impl ConfigReader for Git2Repository
Source§impl Differ for Git2Repository
impl Differ for Git2Repository
Source§impl IgnoreReader for Git2Repository
impl IgnoreReader for Git2Repository
Source§impl IndexManager for Git2Repository
impl IndexManager for Git2Repository
Source§fn stage(&self, paths: &[&str]) -> AppResult<()>
fn stage(&self, paths: &[&str]) -> AppResult<()>
Stages the provided repository-relative paths.
Source§fn unstage(&self, paths: &[&str]) -> AppResult<()>
fn unstage(&self, paths: &[&str]) -> AppResult<()>
Removes the provided repository-relative paths from the index.
Source§fn staged_entries(&self) -> AppResult<Vec<StatusEntry>>
fn staged_entries(&self) -> AppResult<Vec<StatusEntry>>
Lists entries that currently differ between HEAD and the index.
Source§impl IndexReader for Git2Repository
impl IndexReader for Git2Repository
Source§fn index_entry(&self, path: &str) -> AppResult<Option<IndexEntry>>
fn index_entry(&self, path: &str) -> AppResult<Option<IndexEntry>>
Returns the index entry for
path, if the path is present in the index.Source§impl LogReader for Git2Repository
impl LogReader for Git2Repository
Source§impl RefManager for Git2Repository
impl RefManager for Git2Repository
Source§fn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>
fn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>
Lists branches matching the requested filter.
Lists tags in the repository.
Source§fn create_branch(&self, name: &str, target: &str) -> AppResult<()>
fn create_branch(&self, name: &str, target: &str) -> AppResult<()>
Creates a local branch pointing at the given target revision.
Source§fn create_tag(
&self,
name: &str,
target: &str,
message: Option<&str>,
) -> AppResult<()>
fn create_tag( &self, name: &str, target: &str, message: Option<&str>, ) -> AppResult<()>
Creates a tag pointing at the given target revision.
Some(message) creates an annotated tag (with tagger and the given
message, which may be empty); None creates a lightweight tag (a plain
ref). Both backends must follow this convention.Source§impl RemoteManager for Git2Repository
impl RemoteManager for Git2Repository
Source§impl Repository for Git2Repository
impl Repository for Git2Repository
Source§impl TreeReader for Git2Repository
impl TreeReader for Git2Repository
Auto Trait Implementations§
impl !Sync for Git2Repository
impl Freeze for Git2Repository
impl RefUnwindSafe for Git2Repository
impl Send for Git2Repository
impl Unpin for Git2Repository
impl UnsafeUnpin for Git2Repository
impl UnwindSafe for Git2Repository
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